fix(ui): theme-aware accent for stats labels (drop *wxBLUE) - #128
Merged
Conversation
…lour 44 sites across muuli_wdr.cpp used SetForegroundColour(*wxBLUE) for numeric stats labels in fileDetails, clientDetails, sharedfilesBottomDlg, commentLstDlg, and transferBottomPane. *wxBLUE is pure RGB(0,0,255), which reads fine on a white background but is barely visible on dark themes (GNOME Adwaita-dark, macOS dark mode, KDE Breeze Dark, Yaru-dark). Replace with wxSystemSettings::GetColour(wxSYS_COLOUR_HOTLIGHT) — the OS hyperlink/accent colour. It resolves to a contrast-appropriate accent on both light and dark themes via the platform's system-colour API: - macOS: system accent (default blue, follows System Settings → Appearance) - Windows: theme accent colour - wxGTK: theme link colour (Adwaita uses blue on light, lighter blue on dark) Mechanical sweep — no logic change. The visual cue (numeric stats stand out from labels) is preserved; readability is restored on dark themes. Refs amule-org#45.
This was referenced Jun 12, 2026
got3nks
added a commit
that referenced
this pull request
Jun 12, 2026
Adds Italian translations for the 32 strings added by the IP2Country preferences-panel work in #113: - 19 short labels and log strings (source dropdown, status line, license-key field, attribution lines, download failure messages) - 7 fuzzy entries (Database / Source / Download URL / Auto-update / Custom source / Status: Loaded%s / Status: Loaded%s - %s) that msgmerge had guessed from neighbouring strings; corrected + de-fuzzed. - 3 multi-line sub-panel description blocks (DB-IP, MaxMind, Custom URL) covering attribution + licensing notices. Tone follows the existing it.po register (Stato, Aggiorna, Scaricamento, Sorgente). Proper nouns (DB-IP, MaxMind, GeoLite2, MMDB, License Key in MaxMind context) kept verbatim; "Chiave di licenza" used as a standalone field label. After this commit: 1725 translated, 0 fuzzy, 0 untranslated.
3 tasks
got3nks
added a commit
that referenced
this pull request
Jun 17, 2026
PR #128 fixed the *wxBLUE sweep in muuli_wdr.cpp's dialog stat labels but didn't touch the custom DC drawing inside the list controls. Two classes of bug were left in src/GenericClientListCtrl.cpp and src/SearchListCtrl.cpp: 1. Hardcoded text / pen colours that render fine on the default light theme but are unreadable on Adwaita-dark / macOS dark / KDE Breeze Dark. 2. SearchListCtrl's state-coding logic that overlays per-channel tints (`green = 255` for DOWNLOADED, `red = 255` for QUEUED, ...) on top of a base initialised from wxSYS_COLOUR_WINDOWTEXT. On light themes the base is black so the tints produce green / red / magenta as intended; on dark themes the base is white-ish, so the channel assignments are no-ops and *every state collapses to the same colour* -- the semantic cue disappears entirely. Five sites updated: - GenericClientListCtrl.cpp:1004 + :1008 (A4AF badge text + border) -> wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT). Pure decoration, no semantic meaning -- just needs to be readable. - GenericClientListCtrl.cpp:1042 (queue rank decreased, was *wxBLUE) -> hand-tuned blue per theme: (120,170,255) on dark, (0,80,200) on light. - GenericClientListCtrl.cpp:1045 (queue rank increased, was *wxRED) -> hand-tuned red per theme: (255,100,100) on dark, (220,0,0) on light. - GenericClientListCtrl.cpp:1130 (filename mismatch, was *wxRED) -> same red palette as above. - SearchListCtrl.cpp::362-389 (search result state palette) -> replace the channel-tweak logic with explicit per-state palette branching: DOWNLOADED green (80,220,80) / (0,160,0) QUEUED red (255,100,100) / (220,0,0) CANCELED magenta (255,120,200) / (180,0,180) new blue gradient by source count, inverted on dark Primitive used at every draw / refresh site: const bool isDark = wxSystemSettings::GetAppearance().IsDark(); Called per-paint, not cached at startup -- a runtime theme toggle takes effect on the next list refresh. wxSystemAppearance::IsDark() queries: - macOS: NSAppearance bestMatchFromAppearancesWithNames against the dark aqua appearance. - Windows: AppsUseLightTheme registry value. - wxGTK: gtk-application-prefer-dark-theme, with WCAG-style luminance of wxSYS_COLOUR_WINDOW as fallback. Available since wxWidgets 3.1.3, so safely in our 3.2 minimum. Three other call sites surveyed and intentionally left alone: - CaptchaGenerator.cpp:53 (*wxBLACK on *wxWHITE_BRUSH bitmap) drawing onto a known-white surface; theme is irrelevant. - DownloadListCtrl.cpp:1035 / :1037 (wxWHITE / wxBLACK for the percentage label over the progress bar) contrast keyed off the bar's own hardcoded fill colour, not the system background. Closes #177
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.
Summary
Addresses #45 (the "blue text barely readable on dark themes" cluster from ngosang's screenshots).
Fix
44 sites in
muuli_wdr.cppsetSetForegroundColour(*wxBLUE)on numeric stats labels.*wxBLUEis pureRGB(0, 0, 255)— fine on a white background, barely readable on dark themes (GNOME Adwaita-dark, macOS dark mode, KDE Breeze Dark, Yaru-dark).Mechanical sweep replaces every site with
wxSystemSettings::GetColour(wxSYS_COLOUR_HOTLIGHT)— the OS hyperlink/accent colour, which resolves to a contrast-appropriate colour per platform:Distribution of the 44 sites:
No logic change — the visual cue (stat numbers stand out from labels) is preserved; readability is restored on dark themes.
Test plan
amule+amulegui(File Details, Client Details, Transfers pane).