Fix black Layers panel background under stock wxWidgets 3.3 on macOS - #3
Open
raulizahi wants to merge 1 commit into
Open
Conversation
The appearance panel derives its row colour from m_panelLayers' background, which is never set explicitly and resolves to black under unpatched wxWidgets 3.3 on macOS. Set it from wxSYS_COLOUR_WINDOW before deriving, mirroring what the Objects tab already does, and re-read the system colour on dark-mode toggle so it does not go stale. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR fixes a macOS UI theming regression in the PCB editor’s Appearance → Layers tab when building against stock wxWidgets 3.3 (e.g., Homebrew), where an unset panel background can resolve to black and make the Layers list appear incorrectly dark in light mode. The change aligns Layers-tab behavior with the existing Objects-tab approach by explicitly using the system window background colour and ensuring it updates when the system theme changes.
Changes:
- Explicitly set
m_panelLayersbackground towxSYS_COLOUR_WINDOWbefore derivingm_layerPanelColourin the constructor. - Re-read and re-apply
wxSYS_COLOUR_WINDOWinOnDarkModeToggle()so the explicit background doesn’t become stale across a system light/dark switch.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
m_panelLayers->GetBackgroundColour(), but that panel never gets an explicit background colour. Under unpatched wxWidgets 3.3 (e.g. Homebrew 3.3.3 on macOS) the unset default resolves to black, so the Layers list renders dark while the rest of the light-mode UI stays light. The Objects tab already setswxSYS_COLOUR_WINDOWexplicitly, which is why only the Layers tab was affected.m_panelLayers' background fromwxSYS_COLOUR_WINDOWbefore derivingm_layerPanelColourin the constructor, and re-read the live system colour inOnDarkModeToggle()so the explicit colour does not go stale across a system light/dark switch.Related upstream reports: KiCad #13154, wxWidgets #25527. Official macOS builds against KiCad's patched
kicad/macos-wx-3.2fork are unaffected; this only bites builds on stock wx 3.3.Test plan
pcbnewwith the macOS dev preset (Homebrew wxWidgets 3.3.3); Layers tab now matches the light UI theme.wxSYS_COLOUR_WINDOWis what the unset default already resolved to there.🤖 Generated with Claude Code