Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(fix/Qt6) Skins: hide reserved space for invisible table header sort indicators #13535

Merged
merged 2 commits into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion res/skins/Deere/style.qss
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ WTrackTableViewHeader {
WTrackTableViewHeader::section {
height: 1.1em;
font-weight: bold;
padding: 0.1em;
padding: 0.1em -1em 0.1em 0.1em;
background-color: #1A1A1A;
border-top: none;
border-left: none;
Expand Down
3 changes: 3 additions & 0 deletions res/skins/LateNight/style_classic.qss
Original file line number Diff line number Diff line change
Expand Up @@ -2272,6 +2272,9 @@ WTrackTableViewHeader {
stop:1 #111);
}
WTrackTableViewHeader::section {
/* Workaround Qt bug that causes space being reserved for invisible sort indicators.
For details see style-plaemon.qss */
padding-right: -0.95em;
border-right: 1px solid #000;
border-bottom: 1px solid #000;
}
Expand Down
59 changes: 33 additions & 26 deletions res/skins/LateNight/style_palemoon.qss
Original file line number Diff line number Diff line change
Expand Up @@ -1512,23 +1512,6 @@ WEffectSelector:!editable,
border-image: url(skins:LateNight/palemoon/buttons/btn_embedded_library_active.svg) 2 2 2 2;
}

WTrackTableViewHeader {
border-bottom-right-radius: 1px solid #000;
outline: none;
}
WTrackTableViewHeader::section {
outline: none;
border-width: 1px 2px 1px 1px;
border-image: url(skins:LateNight/palemoon/buttons/btn_embedded_library_header.svg) 1 2 1 1;
}
WTrackTableViewHeader::up-arrow,
WTrackTableViewHeader::down-arrow {
outline: none;
/* ToDo: restore image
border-width: 1px 2px 1px 0px;
border-image: url(skins:LateNight/palemoon/buttons/btn_embedded_library_header_sort.svg) 1 2 1 1; */
}

#LibraryFeatureControls QPushButton:!enabled {
outline: none;
border-width: 2px;
Expand Down Expand Up @@ -2734,16 +2717,40 @@ WTrackPropertyEditor {
/*********** table header styles *********************************/

WTrackTableViewHeader {
border-bottom-right-radius: 1px solid #000;
outline: none;
}

WTrackTableViewHeader::section {
/* Setting an image causes QHeaderView to reserve space for the sort indicator,
i.e. column titles are truncated, even where no indicators are shown.
The arrow width and padding are set in style.qss (0.8em + .15em),
so let's set a negative padding-right to shift the text. This will push the
reserved space out of the visible region, but the actual arrow will still be visible.
Now the arrow overlaps the column title again like in Qt5 (bug), so the arrow images
could use a background-color to cover the text, or a gradient to fade it out gently. */
padding: 2px -0.95em 0px 3px;
outline: none;
border-width: 1px 2px 1px 1px;
border-image: url(skins:LateNight/palemoon/buttons/btn_embedded_library_header.svg) 1 2 1 1;
}

WTrackTableViewHeader::up-arrow,
WTrackTableViewHeader::down-arrow {
outline: none;
/* horizontal gradient to fade out the text */
background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,
stop: 0 transparent,
stop: 0.2 #171719,
stop: 1 #171719);
}
WTrackTableViewHeader::section {
padding: 2px 1px 0px 3px;
}
WTrackTableViewHeader::up-arrow {
image: url(skins:LateNight/palemoon/buttons/btn__lib_sort_up.svg);
}
WTrackTableViewHeader::down-arrow {
image: url(skins:LateNight/palemoon/buttons/btn__lib_sort_down.svg);
}
WTrackTableViewHeader::up-arrow {
image: url(skins:LateNight/palemoon/buttons/btn__lib_sort_up.svg);
}
WTrackTableViewHeader::down-arrow {
image: url(skins:LateNight/palemoon/buttons/btn__lib_sort_down.svg);
}




Expand Down
2 changes: 1 addition & 1 deletion res/skins/Shade/style.qss
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,7 @@ WTrackTableViewHeader {
/* Library header 'buttons' */
WTrackTableViewHeader::section {
height: 1.1em;
padding: 0.1em;
padding: 0.1em -0.7em 0.1em 0.1em;
/* set right border so that first column header
on the left doesn't have double border on the left */
border-right: 1px solid #0f0f0f;
Expand Down
8 changes: 1 addition & 7 deletions res/skins/Tango/style.qss
Original file line number Diff line number Diff line change
Expand Up @@ -2756,7 +2756,7 @@ WTrackTableViewHeader {
/* Library header 'buttons' */
WTrackTableViewHeader::section {
height: 1.1em;
padding: 0 0.1em;
padding: 0 -0.7em 0 0.1em;
/* use 'border-right' so that for the header of the leftmost column
the border doesn't add to the border of the surrounding qtableview */
border-right: 1px solid #585858;
Expand All @@ -2782,15 +2782,9 @@ WTrackTableViewHeader {
WTrackTableViewHeader::up-arrow {
image: url(skin:/../Tango/graphics/library_sort_up.svg);
}
WTrackTableViewHeader::up-arrow:hover {
image: url(skin:/../Tango/graphics/library_sort_down.svg);
}
WTrackTableViewHeader::down-arrow {
image: url(skin:/../Tango/graphics/library_sort_down.svg);
}
WTrackTableViewHeader::down-arrow:hover {
image: url(skin:/../Tango/graphics/library_sort_up.svg);
}

WLibraryTextBrowser {
padding-left: 5px;
Expand Down