Align Acrylic10 tint behavior with official dark/light acrylic palette (#1915)

* Initial plan

* Align Acrylic10 tint color and opacity with official dark/light values

Agent-Logs-Url: https://github.com/QL-Win/QuickLook/sessions/7856deeb-578c-4683-879b-e2d924eb4224

Co-authored-by: emako <24737061+emako@users.noreply.github.com>

* Refine Acrylic10 constants for tint palette and opacity

Agent-Logs-Url: https://github.com/QL-Win/QuickLook/sessions/7856deeb-578c-4683-879b-e2d924eb4224

Co-authored-by: emako <24737061+emako@users.noreply.github.com>

* Narrow color parsing exception handling in ViewerWindow

Agent-Logs-Url: https://github.com/QL-Win/QuickLook/sessions/7856deeb-578c-4683-879b-e2d924eb4224

Co-authored-by: emako <24737061+emako@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: emako <24737061+emako@users.noreply.github.com>
This commit is contained in:
Copilot
2026-04-15 00:24:21 +08:00
committed by GitHub
parent 39feab58a3
commit 2229c1691a
2 changed files with 29 additions and 6 deletions
+2 -2
View File
@@ -168,7 +168,7 @@ public static class WindowHelper
Marshal.FreeHGlobal(accentPtr);
}
public static void EnableAcrylicBlur(Window window, Color tintColor, bool isDarkTheme)
public static void EnableAcrylicBlur(Window window, Color tintColor, bool isDarkTheme, double tintOpacity = 0.8)
{
window.Background = Brushes.Transparent;
@@ -193,7 +193,7 @@ public static class WindowHelper
var accent = new AccentPolicy();
var accentStructSize = Marshal.SizeOf(accent);
accent.AccentState = AccentState.AccentEnableAcrylicblurbehind;
accent.GradientColor = ToAbgr(tintColor, 0.8);
accent.GradientColor = ToAbgr(tintColor, tintOpacity);
var accentPtr = Marshal.AllocHGlobal(accentStructSize);
Marshal.StructureToPtr(accent, accentPtr, false);