Skip to content

Fix #1728: fill the active tab so it stands out from the inactive ones - #1807

Open
4RH1T3CT0R7 wants to merge 1 commit into
throneproj:devfrom
4RH1T3CT0R7:fix-1728-active-tab-contrast
Open

Fix #1728: fill the active tab so it stands out from the inactive ones#1807
4RH1T3CT0R7 wants to merge 1 commit into
throneproj:devfrom
4RH1T3CT0R7:fix-1728-active-tab-contrast

Conversation

@4RH1T3CT0R7

@4RH1T3CT0R7 4RH1T3CT0R7 commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

On the default System theme there's no application stylesheet, so .ui is all that styles the tabs, and the only thing separating the selected tab from the rest is a 1px border color. The fills are the same pixel: on Fusion both come out #1E1E1E, contrast 1.00. That's the setup the issue was reported from.

The selected rule now sets background: palette(highlight) and color: palette(highlighted-text), border untouched so nothing shifts as the selection moves. Applied to all nine tab bars, since the report isn't about one dialog.

This is the same idea as #1436, which you turned down because palette roles followed the OS light/dark mode rather than the theme. Your 4ae0b20 changed that: ApplyTheme now installs a full per-theme palette before layering the sheet.

One catch. blacksoft draws unselected tabs with a gradient whose top stop is exactly its palette highlight, so it goes from 1.43 to 1.15. I can add background: palette(button) to the unselected rule (1.55 there), or leave blacksoft on its own sheet. Say which and I'll push it.

Closes #1728

…active ones

On the default System theme no app stylesheet is applied, so the .ui sheet
is the only thing styling the tabs and the selected tab differs from the
rest by nothing but the color of a 1px border: #777777 for every tab,
palette(highlight) for the selected one. The fills are byte-identical -
measured on Fusion, selected and unselected both render #1E1E1E, a contrast
ratio of exactly 1.00. That is the configuration the issue was reported
from, and there is no reliable way to tell which tab is open.

Give the selected tab the highlight as a fill instead of only as a border
outline, with highlighted-text for the label. Both roles come from the
palette rather than a literal, and ThemeManager has set Highlight and
HighlightedText together for all five built-in themes since 4ae0b20, so
the label stays legible on the new fill everywhere - measured 4.6:1 on
qdarkstyle up to 9.3:1 on flatgray.

The border stays as it was so the tab keeps its geometry and nothing shifts
when the selection moves. Applied to all nine tab bars that share this
stylesheet, since the issue reports it across the whole app rather than in
one dialog.

Where the bundled themes ship their own stylesheet the gain is smaller, and
on one it is negative: blacksoft draws unselected tabs with a gradient whose
top stop is #646464, which is exactly its palette highlight, so the filled
tab lands on top of it and separation drops from 1.43 to 1.15. flatgray,
lightblue and softpink improve from roughly 1.05 to 1.3; qdarkstyle is a
wash at 1.36 to 1.31. Left as-is here rather than special-cased, since the
right call on blacksoft is a question for review.
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.

UI: Active tab highlight is barely visible (low contrast)

1 participant