feat: add light mode with system/light/dark theme support#2760
Open
real-alexei wants to merge 8 commits into
Open
feat: add light mode with system/light/dark theme support#2760real-alexei wants to merge 8 commits into
real-alexei wants to merge 8 commits into
Conversation
Add a user-selectable color theme (System / Light / Dark, default System) that follows the OS appearance live. - AppearanceController wraps QStyleHints::colorScheme() and resolves the effective theme from a persisted preference (Conf/appTheme). - AmneziaStyle becomes theme-aware: dark/light palettes selected by an `isDark` flag bound from the controller, so every binding re-themes live with no per-call-site changes. - Settings > Application gains a "Color theme" picker (SelectThemeDrawer). - Light palette: light surfaces, dark text, inverted hover/press overlays, dark modal scrim; #E38E41 accent highlight; apricot primary buttons; the Connect-ring glow is suppressed in light mode. - Migrate stray hardcoded colors into the palette so they theme correctly (ChangelogDrawer, NewsDetail, AddSitePanel, SFTP doc links). - Redraw VerticalRadioButton indicator as palette-driven shapes; add a themeable leading-icon tint to CardWithIconsType. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Translate the new "Color theme" picker strings (Color theme / System / Light / Dark) across all 8 supported languages, in both the PageSettingsApplication and SelectThemeDrawer contexts. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2797011 to
247e78f
Compare
In light mode the checked switch previously kept the dark-mode brown track (richBrown), which read as heavier than the apricot knob on a light surface. Add theme-aware palette roles (switchCheckedTrack, switchCheckedTrackBorder, switchCheckedKnob) so light mode shows the conventional look: a solid apricot track with a white knob. Dark mode is unchanged (still richBrown track + apricot knob). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The connection-state strings ("Connect", "Connecting...", "Connected",
"Reconnecting...", "Disconnecting...", "Preparing...") rendered in
English because the controller was refactored ConnectionController ->
ConnectionUiController, leaving their translations stranded under the
old (now orphaned) tr() context. Re-add a ConnectionUiController
context to all 8 locale files, reusing the existing translations so the
connect ring and status text localize again.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
PopupType had a hardcoded white background while its text uses midnightBlack. In dark mode midnightBlack is near-black (readable on white), but in light mode it resolves to white, so the toast rendered white-on-white — an empty white box (e.g. the "Unable to disconnect during configuration preparation" notice). Add a theme-aware notificationBackground: pure white in dark mode (unchanged), a dark charcoal surface in light mode so the white text reads and the toast stands out against the light app background. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
18279a2 to
93690e8
Compare
The checked+disabled switch kept the dark-mode deep-brown track and muted-brown knob, which looked heavy on a light surface. Add theme-aware roles (switchCheckedDisabledTrack/Border/Knob) so light mode shows a muted apricot track with a white knob — on-but-inactive, consistent with the enabled apricot pill. Dark mode is unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The home protocol dropdown ("XRay v") is a prominent inverted chip:
a light pill in dark mode, which inverted to a harsh near-black pill
in light mode. Soften the light-mode background to a charcoal (#3A3B40)
so it stays prominent without clashing with the light surface.
Also balance the chevron on this short content-hugging pill: the caret
sat right-heavy because the 40px icon touch-target adds ~8px of
centering padding on top of the 16px right margin. Add a
rootButtonImageRightMargin property (default 16, unchanged for other
dropdowns) and trim it to 8 here so the caret is ~symmetric with the
16px text left margin.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
A checked-but-disabled VerticalRadioButton showed its title in selectedTextDisabledColor (burntOrange), which didn't match the pale apricot radio indicator. Use selectedRingColor at the indicator's 0.3 opacity for the checked+disabled title so the label and the dot read as one. Unchecked-disabled, enabled, and dark mode are unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Author
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.










Add a user-selectable color theme (System / Light / Dark, default System) that follows the OS appearance live, plus the light-mode visual polish and translation fixes that came out of testing it.
Theme support
QStyleHints::colorScheme()and resolves the effective theme from a persisted preference (Conf/appTheme).isDarkflag bound from the controller, so every binding re-themes live with no per-call-site changes.SelectThemeDrawer).#E38E41accent highlight; apricot primary buttons; the Connect-ring glow is suppressed in light mode.VerticalRadioButtonindicator as palette-driven shapes; add a themeable leading-icon tint toCardWithIconsType.Light-mode polish
Issues found while testing the light theme (dark mode stays pixel-identical throughout — all of these are gated to the light palette or use theme-aware palette roles):
SwitcherType): the checked track kept the dark-mode brown, which read heavier than the knob on a light surface. Light mode now shows the conventional look — a solid apricot track with a white knob; the disabled "on" pill uses a muted apricot track.PopupType): the popup had a hardcoded white background with theme-inverting text, so in light mode it rendered white-on-white — an empty white box (e.g. the "Unable to disconnect during configuration preparation" notice). Now a theme-awarenotificationBackground: white in dark mode, dark charcoal in light mode, so the message reads and the toast stands out.PageHome/DropDownType): the prominent inverted chip went from a light pill (dark mode) to a harsh near-black pill in light mode — softened to charcoal. Also balanced its chevron on the short content-hugging pill (addedrootButtonImageRightMargin, default unchanged for other dropdowns).VerticalRadioButtontitle now matches the pale-apricot indicator instead of burnt orange.Translations
PageSettingsApplicationandSelectThemeDrawercontexts.ConnectionController→ConnectionUiController, which orphaned theirtr()context, so runtime lookups fell back to source text. Re-added aConnectionUiControllercontext to all 8 locale files, reusing the existing translations.🤖 Generated with Claude Code