Skip to content

Commit 2cd769b

Browse files
committed
Fix UI thread issue and preview
1 parent 88f8274 commit 2cd769b

File tree

9 files changed

+221
-317
lines changed

9 files changed

+221
-317
lines changed

Flow.Launcher.Core/Resource/Theme.cs

Lines changed: 200 additions & 301 deletions
Large diffs are not rendered by default.

Flow.Launcher/MainWindow.xaml.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ private void OnLoaded(object sender, RoutedEventArgs _)
193193
{
194194
ThemeManager.Instance.RefreshFrame();
195195
}), DispatcherPriority.Background);
196+
196197
// MouseEventHandler
197198
PreviewMouseMove += MainPreviewMouseMove;
198199
CheckFirstLaunch();

Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public Theme.ThemeData SelectedTheme
4141
DropShadowEffect = true;
4242
OnPropertyChanged(nameof(IsDropShadowEnabled));
4343
ThemeManager.Instance.RefreshFrame();
44-
//uThemeManager.Instance.SetBlurForWindow();
44+
//ThemeManager.Instance.SetBlurForWindow();
4545
}
4646
}
4747
public bool IsBackdropEnabled => SelectedTheme?.HasBlur ?? false;

Flow.Launcher/Themes/BlurBlack Darker.xaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
</ResourceDictionary.MergedDictionaries>
1313

1414
<system:Boolean x:Key="ThemeBlurEnabled">True</system:Boolean>
15-
<system:String x:Key="BlurMode">Dark</system:String>
15+
<system:String x:Key="SystemBG">Dark</system:String>
1616
<system:String x:Key="CornerType">DoNotRound</system:String>
17-
<Color x:Key="lightBG">#C7000000</Color>
18-
<Color x:Key="darkBG">#C7000000</Color>
17+
<Color x:Key="LightBG">#C7000000</Color>
18+
<Color x:Key="DarkBG">#C7000000</Color>
1919

2020
<Style x:Key="WindowRadius" TargetType="{x:Type Border}">
2121
<Setter Property="CornerRadius" Value="0" />

Flow.Launcher/Themes/BlurBlack.xaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
<ResourceDictionary Source="pack://application:,,,/Themes/Base.xaml" />
1212
</ResourceDictionary.MergedDictionaries>
1313
<system:Boolean x:Key="ThemeBlurEnabled">True</system:Boolean>
14-
<system:String x:Key="BlurMode">Dark</system:String>
14+
<system:String x:Key="SystemBG">Dark</system:String>
1515
<system:String x:Key="CornerType">DoNotRound</system:String>
16-
<Color x:Key="lightBG">#B0000000</Color>
17-
<Color x:Key="darkBG">#B6000000</Color>
16+
<Color x:Key="LightBG">#B0000000</Color>
17+
<Color x:Key="DarkBG">#B6000000</Color>
1818

1919
<Style x:Key="WindowRadius" TargetType="{x:Type Border}">
2020
<Setter Property="CornerRadius" Value="0" />

Flow.Launcher/Themes/BlurWhite.xaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
<ResourceDictionary Source="pack://application:,,,/Themes/Base.xaml" />
1212
</ResourceDictionary.MergedDictionaries>
1313
<system:Boolean x:Key="ThemeBlurEnabled">True</system:Boolean>
14-
<system:String x:Key="BlurMode">Light</system:String>
14+
<system:String x:Key="SystemBG">Light</system:String>
1515
<system:String x:Key="CornerType">DoNotRound</system:String>
16-
<Color x:Key="lightBG">#BFFAFAFA</Color>
17-
<Color x:Key="darkBG">#BFFAFAFA</Color>
16+
<Color x:Key="LightBG">#BFFAFAFA</Color>
17+
<Color x:Key="DarkBG">#BFFAFAFA</Color>
1818
<Style
1919
x:Key="ItemGlyph"
2020
BasedOn="{StaticResource BaseGlyphStyle}"

Flow.Launcher/Themes/Circle System.xaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
<ResourceDictionary Source="pack://application:,,,/Themes/Base.xaml" />
1414
</ResourceDictionary.MergedDictionaries>
1515
<system:Boolean x:Key="ThemeBlurEnabled">True</system:Boolean>
16-
<system:String x:Key="BlurMode">Auto</system:String>
17-
<Color x:Key="lightBG">#BFFAFAFA</Color>
18-
<Color x:Key="darkBG">#BC202020</Color>
16+
<system:String x:Key="SystemBG">Auto</system:String>
17+
<Color x:Key="LightBG">#BFFAFAFA</Color>
18+
<Color x:Key="DarkBG">#BC202020</Color>
1919
<Style
2020
x:Key="ItemGlyph"
2121
BasedOn="{StaticResource BaseGlyphStyle}"

Flow.Launcher/Themes/Win10System.xaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
<ResourceDictionary.MergedDictionaries>
1212
<ResourceDictionary Source="pack://application:,,,/Themes/Base.xaml" />
1313
</ResourceDictionary.MergedDictionaries>
14+
<system:Boolean x:Key="ThemeBlurEnabled">False</system:Boolean>
15+
<system:String x:Key="SystemBG">Auto</system:String>
16+
<Color x:Key="LightBG">#FFFAFAFA</Color>
17+
<Color x:Key="DarkBG">#FF202020</Color>
1418
<Thickness x:Key="ResultMargin">0 0 0 8</Thickness>
1519
<Style
1620
x:Key="ItemGlyph"

Flow.Launcher/Themes/Win11Light.xaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
<ResourceDictionary Source="pack://application:,,,/Themes/Base.xaml" />
1414
</ResourceDictionary.MergedDictionaries>
1515
<system:Boolean x:Key="ThemeBlurEnabled">True</system:Boolean>
16-
<system:String x:Key="BlurMode">Auto</system:String>
16+
<system:String x:Key="SystemBG">Auto</system:String>
1717
<system:String x:Key="CornerType">Round</system:String>
18-
<Color x:Key="lightBG">#BFFAFAFA</Color>
19-
<Color x:Key="darkBG">#DD202020</Color>
18+
<Color x:Key="LightBG">#BFFAFAFA</Color>
19+
<Color x:Key="DarkBG">#DD202020</Color>
2020
<Style
2121
x:Key="BulletStyle"
2222
BasedOn="{StaticResource BaseBulletStyle}"

0 commit comments

Comments
 (0)