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

Conversation

ronso0
Copy link
Member

@ronso0 ronso0 commented Aug 4, 2024

before:
Screenshot_2024-08-04_17-25-48

after:
Screenshot_2024-08-04_17-25-26

Working around a Qt 6 regression, probably this one again https://bugreports.qt.io/browse/QTBUG-27038
(I don't care about reporting this upstream with a minimal reproducible example, usually takes ages until being fixed)

Issue:

QHeaderView will reserve space in the header section for sort indicators, even if they're invisble as soon as we set either an image

WTrackTableViewHeader::up-arrow {
  image: url(skins:LateNight/classic/buttons/btn__lib_sort_up.svg);
}

or the width

WTrackTableViewHeader::up-arrow,
WTrackTableViewHeader::down-arrow {
  width: 0.8em;
}

Fix:

Set a negative padding-right to push the space out of the visible region.
The indicator will be inside nonetheless 🤷‍♂️

Please test on Windows and macOS.

@github-actions github-actions bot added the skins label Aug 4, 2024
@ronso0 ronso0 added this to the 2.5.0 milestone Aug 4, 2024
@ronso0 ronso0 force-pushed the skins-table-header-sort-bug branch from 47c5d27 to b25bc5c Compare August 4, 2024 22:03
@JoergAtGithub
Copy link
Member

LGTM! Thank you!

@JoergAtGithub JoergAtGithub merged commit a1134db into mixxxdj:2.5 Aug 6, 2024
13 checks passed
@ronso0 ronso0 deleted the skins-table-header-sort-bug branch August 6, 2024 20:33
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.

2 participants