mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
- Fix Logic for dwmBG
- Remove Cornertypes in themes
This commit is contained in:
parent
fa5bfd3195
commit
ce55303e9e
6 changed files with 15 additions and 12 deletions
|
|
@ -396,19 +396,26 @@ namespace Flow.Launcher.Core.Resource
|
|||
// Final decision on whether to use dark mode
|
||||
bool useDarkMode = false;
|
||||
|
||||
if (colorScheme == "Dark" || systemBG == "Dark")
|
||||
// If systemBG is not "Auto", prioritize it over ColorScheme and set the mode based on systemBG value
|
||||
if (systemBG == "Dark")
|
||||
{
|
||||
useDarkMode = true; // Dark
|
||||
}
|
||||
else if (colorScheme == "Light" || systemBG == "Light")
|
||||
else if (systemBG == "Light")
|
||||
{
|
||||
useDarkMode = false; // Light
|
||||
}
|
||||
else if (colorScheme == "System" || systemBG == "Auto")
|
||||
else if (systemBG == "Auto")
|
||||
{
|
||||
useDarkMode = isSystemDark; // Auto
|
||||
// If systemBG is "Auto", decide based on ColorScheme
|
||||
if (colorScheme == "Dark")
|
||||
useDarkMode = true;
|
||||
else if (colorScheme == "Light")
|
||||
useDarkMode = false;
|
||||
else
|
||||
useDarkMode = isSystemDark; // Auto (based on system setting)
|
||||
}
|
||||
|
||||
|
||||
// Apply DWM Dark Mode
|
||||
Methods.SetWindowAttribute(new WindowInteropHelper(mainWindow).Handle, DWMWINDOWATTRIBUTE.DWMWA_USE_IMMERSIVE_DARK_MODE, useDarkMode ? 1 : 0);
|
||||
|
||||
|
|
@ -458,6 +465,8 @@ namespace Flow.Launcher.Core.Resource
|
|||
}, DispatcherPriority.Normal);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public bool IsBlurTheme()
|
||||
{
|
||||
if (Environment.OSVersion.Version >= new Version(6, 2))
|
||||
|
|
|
|||
|
|
@ -134,10 +134,8 @@ public partial class SettingsPaneThemeViewModel : BaseModel
|
|||
Constant.System => null,
|
||||
_ => ThemeManagerForColorSchemeSwitch.Current.ApplicationTheme
|
||||
};
|
||||
|
||||
ThemeManager.Instance.RefreshFrame();
|
||||
|
||||
Settings.ColorScheme = value;
|
||||
ThemeManager.Instance.RefreshFrame();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@
|
|||
|
||||
<system:Boolean x:Key="ThemeBlurEnabled">True</system:Boolean>
|
||||
<system:String x:Key="SystemBG">Dark</system:String>
|
||||
<system:String x:Key="CornerType">DoNotRound</system:String>
|
||||
<Color x:Key="LightBG">#C7000000</Color>
|
||||
<Color x:Key="DarkBG">#C7000000</Color>
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@
|
|||
</ResourceDictionary.MergedDictionaries>
|
||||
<system:Boolean x:Key="ThemeBlurEnabled">True</system:Boolean>
|
||||
<system:String x:Key="SystemBG">Dark</system:String>
|
||||
<system:String x:Key="CornerType">DoNotRound</system:String>
|
||||
<Color x:Key="LightBG">#B0000000</Color>
|
||||
<Color x:Key="DarkBG">#B6000000</Color>
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@
|
|||
</ResourceDictionary.MergedDictionaries>
|
||||
<system:Boolean x:Key="ThemeBlurEnabled">True</system:Boolean>
|
||||
<system:String x:Key="SystemBG">Light</system:String>
|
||||
<system:String x:Key="CornerType">DoNotRound</system:String>
|
||||
<Color x:Key="LightBG">#BFFAFAFA</Color>
|
||||
<Color x:Key="DarkBG">#BFFAFAFA</Color>
|
||||
<Style
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@
|
|||
</ResourceDictionary.MergedDictionaries>
|
||||
<system:Boolean x:Key="ThemeBlurEnabled">True</system:Boolean>
|
||||
<system:String x:Key="SystemBG">Auto</system:String>
|
||||
<system:String x:Key="CornerType">Round</system:String>
|
||||
<Color x:Key="LightBG">#E5E6E6E6</Color>
|
||||
<Color x:Key="DarkBG">#DF1F1F1F</Color>
|
||||
<Style
|
||||
|
|
|
|||
Loading…
Reference in a new issue