mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Add Proprerty for blur themes
This commit is contained in:
parent
5b81cf5484
commit
f00f98cc5c
4 changed files with 17 additions and 7 deletions
|
|
@ -168,9 +168,9 @@ namespace Flow.Launcher.Core.Resource
|
|||
{
|
||||
DWM_WINDOW_CORNER_PREFERENCE preference = cornerMode switch
|
||||
{
|
||||
"DONOTROUND" => DWM_WINDOW_CORNER_PREFERENCE.DoNotRound,
|
||||
"ROUND" => DWM_WINDOW_CORNER_PREFERENCE.Round,
|
||||
"ROUNDSMALL" => DWM_WINDOW_CORNER_PREFERENCE.RoundSmall,
|
||||
"DoNotRound" => DWM_WINDOW_CORNER_PREFERENCE.DoNotRound,
|
||||
"Round" => DWM_WINDOW_CORNER_PREFERENCE.Round,
|
||||
"RoundSmall" => DWM_WINDOW_CORNER_PREFERENCE.RoundSmall,
|
||||
_ => DWM_WINDOW_CORNER_PREFERENCE.Default,
|
||||
};
|
||||
|
||||
|
|
@ -333,13 +333,13 @@ namespace Flow.Launcher.Core.Resource
|
|||
}
|
||||
else if (Mode == "Dark")
|
||||
{
|
||||
mainWindow.Background = new SolidColorBrush(Colors.Green);
|
||||
mainWindow.Background = new SolidColorBrush(darkBG);
|
||||
Methods.SetWindowAttribute(new WindowInteropHelper(mainWindow).Handle, DWMWINDOWATTRIBUTE.DWMWA_USE_IMMERSIVE_DARK_MODE, 1);
|
||||
return;
|
||||
}
|
||||
else if (Mode == "Light")
|
||||
{
|
||||
mainWindow.Background = new SolidColorBrush(Colors.Yellow);
|
||||
mainWindow.Background = new SolidColorBrush(lightBG);
|
||||
Methods.SetWindowAttribute(new WindowInteropHelper(mainWindow).Handle, DWMWINDOWATTRIBUTE.DWMWA_USE_IMMERSIVE_DARK_MODE, 0);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,6 +12,10 @@
|
|||
</ResourceDictionary.MergedDictionaries>
|
||||
|
||||
<system:Boolean x:Key="ThemeBlurEnabled">True</system:Boolean>
|
||||
<system:String x:Key="BlurMode">Dark</system:String>
|
||||
<system:String x:Key="CornerType">DoNotRound</system:String>
|
||||
<Color x:Key="lightBG">#C7000000</Color>
|
||||
<Color x:Key="darkBG">#C7000000</Color>
|
||||
|
||||
<Style x:Key="WindowRadius" TargetType="{x:Type Border}">
|
||||
<Setter Property="CornerRadius" Value="0" />
|
||||
|
|
|
|||
|
|
@ -11,7 +11,11 @@
|
|||
<ResourceDictionary Source="pack://application:,,,/Themes/Base.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<system:Boolean x:Key="ThemeBlurEnabled">True</system:Boolean>
|
||||
<system:String x:Key="BlurMode">Auto</system:String>
|
||||
<system:String x:Key="BlurMode">Dark</system:String>
|
||||
<system:String x:Key="CornerType">DoNotRound</system:String>
|
||||
<Color x:Key="lightBG">#B0000000</Color>
|
||||
<Color x:Key="darkBG">#B6000000</Color>
|
||||
|
||||
<Style x:Key="WindowRadius" TargetType="{x:Type Border}">
|
||||
<Setter Property="CornerRadius" Value="0" />
|
||||
</Style>
|
||||
|
|
|
|||
|
|
@ -11,8 +11,10 @@
|
|||
<ResourceDictionary Source="pack://application:,,,/Themes/Base.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<system:Boolean x:Key="ThemeBlurEnabled">True</system:Boolean>
|
||||
<system:String x:Key="BlurMode">light</system:String>
|
||||
<system:String x:Key="BlurMode">Light</system:String>
|
||||
<system:String x:Key="CornerType">DoNotRound</system:String>
|
||||
<Color x:Key="lightBG">#BFFAFAFA</Color>
|
||||
<Color x:Key="darkBG">#BFFAFAFA</Color>
|
||||
<Style
|
||||
x:Key="ItemGlyph"
|
||||
BasedOn="{StaticResource BaseGlyphStyle}"
|
||||
|
|
|
|||
Loading…
Reference in a new issue