Repository navigation
Add a theme switcher to the sidebar and fix black text in dark mode - #13
Conversation
The sidebar button cycles Windows, Light and Dark; the choice applies at once and is kept in window.json. The SidebarLink, ChoiceCard and Switch styles now set their own Foreground: replacing Fluent's implicit style let the classic theme's black text show through on dark backgrounds. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The window follows Windows until the first click; the button shows the look Windows gives (read from AppsUseLightTheme) and each click switches to the other one, which is then kept in window.json. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Hello @MarcelL94, First of all, thanks a lot for your contribution. I really appreciate your support. |
Clicks go Windows theme (follows Windows), then the opposite of Windows' look, then Windows' look kept fixed, then the Windows theme again, as asked in the review of flysimdev#13. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks for the review! Switching back to the default behaviour is now possible: the theme button is a 3-step cycle, so users can always return to following Windows.
The next click goes back to Windows theme. Every click from the default changes the colours straight away, and the choice is kept in |
flysimdev
left a comment
There was a problem hiding this comment.
@MarcelL94 Your improvement will go to the v1.2.1 release, as well as a bug fix related to the issue you posted.
Thanks one more time
What
AppsUseLightTheme). The choice applies immediately and is kept inwindow.json(WindowPreferences.Theme, stored by name; older files without it keep following Windows).SidebarLink,ChoiceCardandSwitchstyles replace Fluent's implicit style for their control, so the classic theme's blackForegroundshowed through on dark backgrounds (e.g. "Support the project", the quality preset cards, the switch labels). They now setTextFillColorPrimaryBrushthemselves.Changes
Gui/AppTheme.cs(new):AppThemeenum,ThemeChoice(label, glyph, the next one in the cycle), mapping to WPFThemeMode,WindowsTheme(reads whether Windows shows apps light or dark).Gui/ViewModels/MainViewModel.cs:Themepreference,Theme/ChangeThemefor the sidebar button.Gui/App.xaml.cs: applies the saved theme at startup.Gui/MainWindow.xaml: the sidebar button.Gui/Theme.xaml:Foregroundon the three styles.tests/AppThemeTests.cs(new): theme mapping, the click cycle for a light and a dark Windows,window.jsonround-trip.Testing
dotnet build(no warnings) anddotnet test --solution OrthoStreamXP.slnx: 372 passed.Notes
develop, but that branch doesn't exist, so this targetsmain.🤖 Generated with Claude Code