mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-15 11:17:53 +01:00
modifying highlight in preview
This commit is contained in:
@@ -95,7 +95,7 @@ namespace ProjectsEditor.Utils
|
|||||||
}
|
}
|
||||||
|
|
||||||
Bitmap previewBitmap = new Bitmap(Scaled(bounds.Width + (verticalGaps.Count * gapWidth)), Scaled((bounds.Height * 1.2) + (horizontalGaps.Count * gapHeight)));
|
Bitmap previewBitmap = new Bitmap(Scaled(bounds.Width + (verticalGaps.Count * gapWidth)), Scaled((bounds.Height * 1.2) + (horizontalGaps.Count * gapHeight)));
|
||||||
double desiredIconSize = Scaled(Math.Min(bounds.Width, bounds.Height)) * 0.3;
|
double desiredIconSize = Scaled(Math.Min(bounds.Width, bounds.Height)) * 0.25;
|
||||||
using (Graphics g = Graphics.FromImage(previewBitmap))
|
using (Graphics g = Graphics.FromImage(previewBitmap))
|
||||||
{
|
{
|
||||||
g.SmoothingMode = SmoothingMode.AntiAlias;
|
g.SmoothingMode = SmoothingMode.AntiAlias;
|
||||||
@@ -123,7 +123,8 @@ namespace ProjectsEditor.Utils
|
|||||||
foreach (Application app in appsToDraw.Where(x => x.IsHighlighted))
|
foreach (Application app in appsToDraw.Where(x => x.IsHighlighted))
|
||||||
{
|
{
|
||||||
Rectangle rect = new Rectangle(TransformX(app.ScaledPosition.X), TransformY(app.ScaledPosition.Y), Scaled(app.ScaledPosition.Width), Scaled(app.ScaledPosition.Height));
|
Rectangle rect = new Rectangle(TransformX(app.ScaledPosition.X), TransformY(app.ScaledPosition.Y), Scaled(app.ScaledPosition.Width), Scaled(app.ScaledPosition.Height));
|
||||||
DrawWindow(g, brush, rect, app, desiredIconSize);
|
Brush brushForHighlight = new SolidBrush(Common.ThemeManager.GetCurrentTheme() == Common.Theme.Dark ? Color.FromArgb(192, 255, 255, 255) : Color.FromArgb(192, 0, 0, 0));
|
||||||
|
DrawWindow(g, brushForHighlight, rect, app, desiredIconSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
// draw the minimized windows
|
// draw the minimized windows
|
||||||
|
|||||||
Reference in New Issue
Block a user