From 64c5439b603a5a79c1e10b4e7bcce9b23c36afe9 Mon Sep 17 00:00:00 2001 From: donlaci Date: Fri, 28 Jun 2024 13:02:32 +0200 Subject: [PATCH] modifying highlight in preview --- src/modules/Projects/ProjectsEditor/Utils/DrawHelper.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/modules/Projects/ProjectsEditor/Utils/DrawHelper.cs b/src/modules/Projects/ProjectsEditor/Utils/DrawHelper.cs index 11312d644f..55a64fe79e 100644 --- a/src/modules/Projects/ProjectsEditor/Utils/DrawHelper.cs +++ b/src/modules/Projects/ProjectsEditor/Utils/DrawHelper.cs @@ -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))); - 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)) { g.SmoothingMode = SmoothingMode.AntiAlias; @@ -123,7 +123,8 @@ namespace ProjectsEditor.Utils 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)); - 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