Skip to content

fix: combobox labels unreadable in dark mode in Create Filament Preset dialog - #10827

Open
BenJule wants to merge 1 commit into
bambulab:masterfrom
BenJule:fix/8949-dark-mode-filament-preset-labels
Open

fix: combobox labels unreadable in dark mode in Create Filament Preset dialog#10827
BenJule wants to merge 1 commit into
bambulab:masterfrom
BenJule:fix/8949-dark-mode-filament-preset-labels

Conversation

@BenJule

@BenJule BenJule commented May 20, 2026

Copy link
Copy Markdown
Contributor

Summary

In the "Create / Edit Filament Preset" dialog, all combobox labels were always black in dark mode, making them unreadable against the dark background.

Root cause: The labels used SetLabelColor(*wxBLACK), which sets a custom StateColor that bypasses the SetForegroundColour mechanism. UpdateDlgDarkUI only remaps colors set through SetForegroundColour, so these labels were never updated when switching to dark mode.

Fix: Replace all 10 occurrences of SetLabelColor(*wxBLACK) with SetLabelColor(wxGetApp().get_label_clr_default()), which returns the correct foreground color for the currently active theme at construction time.

Test plan

  • Enable dark mode
  • Open Filament settings → click "New Filament Preset" or edit an existing one
  • All combobox labels should be light-colored and readable

Closes #8949

@BenJule
BenJule force-pushed the fix/8949-dark-mode-filament-preset-labels branch 2 times, most recently from 3dbeb00 to 43a1e7c Compare May 21, 2026 08:55
@BenJule BenJule closed this Jun 7, 2026
@BenJule
BenJule deleted the fix/8949-dark-mode-filament-preset-labels branch June 7, 2026 10:09
@BenJule
BenJule restored the fix/8949-dark-mode-filament-preset-labels branch June 7, 2026 11:38
@BenJule BenJule reopened this Jun 7, 2026
@BenJule

BenJule commented Jun 7, 2026

Copy link
Copy Markdown
Contributor Author

Apologies — this PR was closed by mistake on 2026-06-07, and that was an error on my side, not a deliberate decision to withdraw the change.

It happened as an unintended side effect of a branch cleanup in my fork: deleting the head branch automatically closed this PR. The contribution still stands. I have restored the branch and reopened the PR. Sorry for the noise and any confusion this caused.

@tonghao-bbl
tonghao-bbl removed the request for review from XunZhangBambu June 18, 2026 06:44
@tonghao-bbl

Copy link
Copy Markdown
Contributor

Hi @BenJule Thanks for your contributing, however we can't reproduce the dark mode issue mentioned by some users and we will wait for the response for some time. During the time we will not merge this PR.

@BambulabRobot
BambulabRobot requested review from MackBambu and walterwongbbl and removed request for MackBambu June 22, 2026 08:39
@tonghao-bbl
tonghao-bbl removed the request for review from walterwongbbl June 26, 2026 08:55
@BenJule

BenJule commented Jun 27, 2026

Copy link
Copy Markdown
Contributor Author

Sure - here are exact repro steps so you can reproduce the dark-mode case:

  1. Settings/Preferences → enable Dark mode (and restart if your build needs it to apply).
  2. Go to the filament list and click Create Filament (or Create → Filament Preset) to open the Create Filament Preset dialog.
  3. Look at the comboboxes (vendor / type / base preset dropdowns): the label text is rendered in a dark color on the dark background, so the selected value is effectively unreadable until you hover/open the dropdown.

Root cause: those comboboxes get the default (light-theme) text color instead of the dark-mode foreground, so on the dark dialog background the contrast is near zero. The PR sets the proper foreground color for them. Happy to add a screenshot if a maintainer dark-mode build is handy - I don't have a GUI build environment here, so I traced it in code rather than capturing it.

@tonghao-bbl

Copy link
Copy Markdown
Contributor

@lanewei120 LGTM

@lanewei120

Copy link
Copy Markdown
Collaborator

could you remove the modification on .github/workflows/build_all.yml?
@BenJule

…t dialog (bambulab#8949)

Labels were set with SetLabelColor(*wxBLACK), which uses a custom
StateColor path that bypasses the SetForegroundColour mechanism
UpdateDlgDarkUI relies on for color remapping.  Replace all ten
occurrences with SetLabelColor(wxGetApp().get_label_clr_default())
which returns the correct foreground color for the active theme.

Closes bambulab#8949
@BenJule
BenJule force-pushed the fix/8949-dark-mode-filament-preset-labels branch from 43a1e7c to f7a47de Compare September 2, 2026 13:44
@BenJule

BenJule commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

@lanewei120 Done, thanks. I removed the .github/workflows/build_all.yml modification and cleaned up the branch history. The PR now contains only the intended CreatePresetsDialog.cpp dark-mode fix.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Text is invisible on the new filament window in dark mode

3 participants