Repository navigation
Conversation
The selected entry's text was always drawn in the entry's text_color, and an entry with no color has Color() == 0, which Qt draws as black. In dark mode the selected value was unreadable. Now the line edit keeps the default palette unless the entry sets a color, matching how the popup list already treats items without a color.
dayfine
commented
Nov 16, 2026
|
|
||
| // Shows the selected entry's text in its own color. An entry with no color | ||
| // keeps the theme's text color: Color() is 0, which Qt draws as black. | ||
| static void set_selected_text_color(QLineEdit& line_edit, Color color){ |
Owner
Author
There was a problem hiding this comment.
please fix codehealth finding
Owner
Author
There was a problem hiding this comment.
Fixed in 3e86c5f: the color (input) now comes before the QLineEdit& (output). The other two advisories are the existing function lengths, unchanged by this PR.
|
|
||
| // Shows the selected entry's text in its own color. An entry with no color | ||
| // keeps the theme's text color: Color() is 0, which Qt draws as black. | ||
| static void set_selected_text_color(QLineEdit& line_edit, Color color){ |
Owner
Author
There was a problem hiding this comment.
It's what keeps the helper private to this file (internal linkage). Without it, clang's -Wmissing-prototypes flags it as an error, and a same-named free function in another .cpp in PokemonAutomation would collide at link time. So I kept it.
Owner
Author
|
Upstream: PokemonAutomation#1916 (one commit f8ed1ce on upstream/string-select-text-color, based on upstream main). |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
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.
The Probelm
A StringSelect dropdown drew its selected value in the entry's
text_color, and an entry with no color hasColor() == 0, which Qt draws as black, so in dark mode the selected value was unreadableThe Fix
The line edit now keeps the theme's palette unless the entry sets a color, the same rule the popup list already uses (
if (item.text_color)). The three copies of the palette code become one helper.Testing
Before
After