Skip to content

Commit 2cd5174

Browse files
committed
Adjust themes
1 parent f00f98c commit 2cd5174

File tree

5 files changed

+20
-10
lines changed

5 files changed

+20
-10
lines changed

Flow.Launcher.Core/Resource/Theme.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,6 @@ public void RefreshFrame()
153153

154154
//Methods.SetWindowAttribute(new WindowInteropHelper(mainWindow).Handle, DWMWINDOWATTRIBUTE.DWMWA_BORDER_COLOR, 0x00FF0000);
155155
//Methods.SetWindowAttribute(new WindowInteropHelper(mainWindow).Handle, DWMWINDOWATTRIBUTE.DWMWA_SYSTEMBACKDROP_TYPE, 3);
156-
ThemeModeColor(BlurMode());
157156
SetBlurForWindow();
158157
SetCornerForWindow();
159158
}
@@ -197,12 +196,11 @@ public void SetBlurForWindow()
197196
var windowBorderStyle = dict["WindowBorderStyle"] as Style;
198197
if (windowBorderStyle == null)
199198
return;
200-
Methods.SetWindowAttribute(new WindowInteropHelper(mainWindow).Handle, DWMWINDOWATTRIBUTE.DWMWA_SYSTEMBACKDROP_TYPE, 3);
199+
//Methods.SetWindowAttribute(new WindowInteropHelper(mainWindow).Handle, DWMWINDOWATTRIBUTE.DWMWA_SYSTEMBACKDROP_TYPE, 3);
201200
if (BlurEnabled)
202201
{
203202
//mainWindow.WindowStyle = WindowStyle.SingleBorderWindow;
204203
//BlurColor(BlurMode());
205-
ThemeModeColor(BlurMode());
206204
Debug.WriteLine("~~~~~~~~~~~~~~~~~~~~");
207205
Debug.WriteLine(BlurMode());
208206
windowBorderStyle.Setters.Remove(windowBorderStyle.Setters.OfType<Setter>().FirstOrDefault(x => x.Property.Name == "Background"));
@@ -219,6 +217,7 @@ public void SetBlurForWindow()
219217
Methods.SetWindowAttribute(new WindowInteropHelper(mainWindow).Handle, DWMWINDOWATTRIBUTE.DWMWA_SYSTEMBACKDROP_TYPE, 1);
220218

221219
}
220+
ThemeModeColor(BlurMode());
222221
UpdateResourceDictionary(dict);
223222
}
224223

@@ -343,6 +342,10 @@ public void ThemeModeColor(string Mode)
343342
Methods.SetWindowAttribute(new WindowInteropHelper(mainWindow).Handle, DWMWINDOWATTRIBUTE.DWMWA_USE_IMMERSIVE_DARK_MODE, 0);
344343
return;
345344
}
345+
else
346+
{
347+
mainWindow.Background = new SolidColorBrush(Colors.Transparent);
348+
}
346349
}
347350
public void BlurColor(string Color)
348351
{

Flow.Launcher/MainWindow.xaml.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,6 @@ private void OnLoaded(object sender, RoutedEventArgs _)
190190
{
191191
ThemeManager.Instance.RefreshFrame();
192192
}), DispatcherPriority.Background);
193-
194193
// MouseEventHandler
195194
PreviewMouseMove += MainPreviewMouseMove;
196195
CheckFirstLaunch();

Flow.Launcher/Themes/Base.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
<Setter Property="BorderThickness" Value="0" />
9494
<Setter Property="Background" Value="#2F2F2F" />
9595
<Setter Property="Padding" Value="0 0 0 0" />
96-
<Setter Property="CornerRadius" Value="0" />
96+
<Setter Property="CornerRadius" Value="5" />
9797
<Setter Property="UseLayoutRounding" Value="True" />
9898
<Setter Property="SnapsToDevicePixels" Value="True" />
9999
</Style>

Flow.Launcher/Themes/Pink.xaml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
1-
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
1+
<ResourceDictionary
2+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
xmlns:system="clr-namespace:System;assembly=mscorlib">
25
<ResourceDictionary.MergedDictionaries>
36
<ResourceDictionary Source="pack://application:,,,/Themes/Base.xaml" />
47
</ResourceDictionary.MergedDictionaries>
8+
<system:Boolean x:Key="ThemeBlurEnabled">True</system:Boolean>
9+
<system:String x:Key="BlurMode">Light</system:String>
10+
<system:String x:Key="CornerType">RoundSmall</system:String>
11+
<Color x:Key="lightBG">#DDFEC7D7</Color>
12+
<Color x:Key="darkBG">#DDFEC7D7</Color>
513
<Thickness x:Key="ResultMargin">0 0 0 0</Thickness>
614
<Style
715
x:Key="ItemGlyph"
@@ -32,15 +40,15 @@
3240
TargetType="{x:Type Border}">
3341
<Setter Property="CornerRadius" Value="8" />
3442
<Setter Property="Background" Value="#fec7d7" />
35-
<Setter Property="BorderThickness" Value="3" />
43+
<Setter Property="BorderThickness" Value="0" />
3644
<Setter Property="BorderBrush" Value="#0e172c" />
3745
</Style>
3846
<Style
3947
x:Key="SeparatorStyle"
4048
BasedOn="{StaticResource BaseSeparatorStyle}"
4149
TargetType="{x:Type Rectangle}">
42-
<Setter Property="Fill" Value="#0e172c" />
43-
<Setter Property="Height" Value="3" />
50+
<Setter Property="Fill" Value="#DFDE89A2" />
51+
<Setter Property="Height" Value="1" />
4452
<Setter Property="Margin" Value="0 0 0 0" />
4553
</Style>
4654
<Style

Flow.Launcher/Themes/Win11Light.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
</ResourceDictionary.MergedDictionaries>
1515
<system:Boolean x:Key="ThemeBlurEnabled">True</system:Boolean>
1616
<system:String x:Key="BlurMode">Auto</system:String>
17-
<system:String x:Key="CornerType">ROUND</system:String>
17+
<system:String x:Key="CornerType">Round</system:String>
1818
<Color x:Key="lightBG">#BFFAFAFA</Color>
1919
<Color x:Key="darkBG">#DD202020</Color>
2020
<Style

0 commit comments

Comments
 (0)