Skip to content

Fix black Layers panel background under stock wxWidgets 3.3 on macOS - #3

Open
raulizahi wants to merge 1 commit into
10-X-eng:feature/codex-kicad-10from
raulizahi:fix/appearance-panel-wx33-macos
Open

Fix black Layers panel background under stock wxWidgets 3.3 on macOS#3
raulizahi wants to merge 1 commit into
10-X-eng:feature/codex-kicad-10from
raulizahi:fix/appearance-panel-wx33-macos

Conversation

@raulizahi

Copy link
Copy Markdown

Summary

  • The PCB editor's Appearance panel derives the Layers-tab background from 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 sets wxSYS_COLOUR_WINDOW explicitly, which is why only the Layers tab was affected.
  • Set m_panelLayers' background from wxSYS_COLOUR_WINDOW before deriving m_layerPanelColour in the constructor, and re-read the live system colour in OnDarkModeToggle() 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.2 fork are unaffected; this only bites builds on stock wx 3.3.

Test plan

  • Built pcbnew with the macOS dev preset (Homebrew wxWidgets 3.3.3); Layers tab now matches the light UI theme.
  • No behaviour change expected on Linux/Windows or patched-wx builds: wxSYS_COLOUR_WINDOW is what the unset default already resolved to there.

🤖 Generated with Claude Code

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>
Copilot AI review requested due to automatic review settings July 23, 2026 02:24

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_panelLayers background to wxSYS_COLOUR_WINDOW before deriving m_layerPanelColour in the constructor.
  • Re-read and re-apply wxSYS_COLOUR_WINDOW in OnDarkModeToggle() 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants