Skip to content

Commit ce55303

Browse files
committed
- Fix Logic for dwmBG
- Remove Cornertypes in themes
1 parent fa5bfd3 commit ce55303

File tree

6 files changed

+15
-12
lines changed

6 files changed

+15
-12
lines changed

Flow.Launcher.Core/Resource/Theme.cs

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -396,19 +396,26 @@ public void ColorizeWindow(string Mode)
396396
// Final decision on whether to use dark mode
397397
bool useDarkMode = false;
398398

399-
if (colorScheme == "Dark" || systemBG == "Dark")
399+
// If systemBG is not "Auto", prioritize it over ColorScheme and set the mode based on systemBG value
400+
if (systemBG == "Dark")
400401
{
401402
useDarkMode = true; // Dark
402403
}
403-
else if (colorScheme == "Light" || systemBG == "Light")
404+
else if (systemBG == "Light")
404405
{
405406
useDarkMode = false; // Light
406407
}
407-
else if (colorScheme == "System" || systemBG == "Auto")
408+
else if (systemBG == "Auto")
408409
{
409-
useDarkMode = isSystemDark; // Auto
410+
// If systemBG is "Auto", decide based on ColorScheme
411+
if (colorScheme == "Dark")
412+
useDarkMode = true;
413+
else if (colorScheme == "Light")
414+
useDarkMode = false;
415+
else
416+
useDarkMode = isSystemDark; // Auto (based on system setting)
410417
}
411-
418+
412419
// Apply DWM Dark Mode
413420
Methods.SetWindowAttribute(new WindowInteropHelper(mainWindow).Handle, DWMWINDOWATTRIBUTE.DWMWA_USE_IMMERSIVE_DARK_MODE, useDarkMode ? 1 : 0);
414421

@@ -458,6 +465,8 @@ public void ColorizeWindow(string Mode)
458465
}, DispatcherPriority.Normal);
459466
}
460467

468+
469+
461470
public bool IsBlurTheme()
462471
{
463472
if (Environment.OSVersion.Version >= new Version(6, 2))

Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,8 @@ public string ColorScheme
134134
Constant.System => null,
135135
_ => ThemeManagerForColorSchemeSwitch.Current.ApplicationTheme
136136
};
137-
138-
ThemeManager.Instance.RefreshFrame();
139-
140137
Settings.ColorScheme = value;
138+
ThemeManager.Instance.RefreshFrame();
141139
}
142140
}
143141

Flow.Launcher/Themes/BlurBlack Darker.xaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
<system:Boolean x:Key="ThemeBlurEnabled">True</system:Boolean>
1515
<system:String x:Key="SystemBG">Dark</system:String>
16-
<system:String x:Key="CornerType">DoNotRound</system:String>
1716
<Color x:Key="LightBG">#C7000000</Color>
1817
<Color x:Key="DarkBG">#C7000000</Color>
1918

Flow.Launcher/Themes/BlurBlack.xaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
</ResourceDictionary.MergedDictionaries>
1313
<system:Boolean x:Key="ThemeBlurEnabled">True</system:Boolean>
1414
<system:String x:Key="SystemBG">Dark</system:String>
15-
<system:String x:Key="CornerType">DoNotRound</system:String>
1615
<Color x:Key="LightBG">#B0000000</Color>
1716
<Color x:Key="DarkBG">#B6000000</Color>
1817

Flow.Launcher/Themes/BlurWhite.xaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
</ResourceDictionary.MergedDictionaries>
1313
<system:Boolean x:Key="ThemeBlurEnabled">True</system:Boolean>
1414
<system:String x:Key="SystemBG">Light</system:String>
15-
<system:String x:Key="CornerType">DoNotRound</system:String>
1615
<Color x:Key="LightBG">#BFFAFAFA</Color>
1716
<Color x:Key="DarkBG">#BFFAFAFA</Color>
1817
<Style

Flow.Launcher/Themes/Circle System.xaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
</ResourceDictionary.MergedDictionaries>
1515
<system:Boolean x:Key="ThemeBlurEnabled">True</system:Boolean>
1616
<system:String x:Key="SystemBG">Auto</system:String>
17-
<system:String x:Key="CornerType">Round</system:String>
1817
<Color x:Key="LightBG">#E5E6E6E6</Color>
1918
<Color x:Key="DarkBG">#DF1F1F1F</Color>
2019
<Style

0 commit comments

Comments
 (0)