mirror of
https://github.com/QL-Win/QuickLook.git
synced 2026-05-07 02:00:21 +08:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user