Skip to content

Commit 394fd1d

Browse files
committed
Support light/dark style
1 parent 1f61d93 commit 394fd1d

File tree

2 files changed

+370
-35
lines changed

2 files changed

+370
-35
lines changed

Flow.Launcher/ReleaseNotesWindow.xaml.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
using System.Windows.Input;
1111
using System.Windows.Media;
1212
using Flow.Launcher.Infrastructure.Http;
13-
using MdXaml;
1413

1514
namespace Flow.Launcher
1615
{
@@ -155,7 +154,6 @@ private sealed class GitHubReleaseInfo
155154

156155
private void MarkdownViewer_Loaded(object sender, RoutedEventArgs e)
157156
{
158-
MarkdownViewer.MarkdownStyle = MarkdownStyle.GithubLike;
159157
RefreshMarkdownViewer();
160158
}
161159

@@ -197,11 +195,13 @@ private void ThemeManager_ActualApplicationThemeChanged(ModernWpf.ThemeManager s
197195
{
198196
if (ModernWpf.ThemeManager.Current.ActualApplicationTheme == ModernWpf.ApplicationTheme.Light)
199197
{
198+
MarkdownViewer.MarkdownStyle = (Style)Application.Current.Resources["DocumentStyleGithubLikeLight"];
200199
MarkdownViewer.Foreground = Brushes.Black;
201200
MarkdownViewer.Background = Brushes.White;
202201
}
203202
else
204203
{
204+
MarkdownViewer.MarkdownStyle = (Style)Application.Current.Resources["DocumentStyleGithubLikeDark"];
205205
MarkdownViewer.Foreground = Brushes.White;
206206
MarkdownViewer.Background = Brushes.Black;
207207
}

0 commit comments

Comments
 (0)