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

WTrackTableView: don't use header section highlight… #3818

Merged
merged 1 commit into from
May 4, 2021

Conversation

ronso0
Copy link
Member

@ronso0 ronso0 commented Apr 30, 2021

...explicitely style with qss only.

As soon as the tableview is focused all column labels would be automatically rendered bold -- and previous style is not restored when the tableview is unfocused, only when the table content changes. This can not be overwritten with qss, so it can screw up the skin design.
Also, due to selectionModel()->selectedRows() it is not even useful to highlight the focused column.

I did not find a qss way to override the hader font for focused table views -- doing this in c++ is the last resort (and I have no idea why it would be enabled in the first place because I don't see UI benefit).
No side effects to be expected https://doc.qt.io/qt-5/qheaderview.html#highlightSections-prop

@ronso0 ronso0 added this to In progress in 2.3 release via automation Apr 30, 2021
@github-actions github-actions bot added the ui label Apr 30, 2021
@Holzhaus
Copy link
Member

Holzhaus commented May 3, 2021

Looks good I think.

Screenshot from 2021-05-03 23-03-56
Screenshot from 2021-05-03 23-03-26
Screenshot from 2021-05-03 23-03-01
Screenshot from 2021-05-03 23-02-19

Ready for merge?

@ronso0
Copy link
Member Author

ronso0 commented May 3, 2021

not really. the reason for this PR is that I use Open Sans Semibold for the header, but setHighlightSections(true); would make it bold. I rebased onto 2.3 and LateNight and it should look like this:
image

Other skins are using bold anyway.

@ronso0
Copy link
Member Author

ronso0 commented May 3, 2021

@Holzhaus Can you check what fonts are recognized on your machine?
I checked with Windows 10 and the font changes in #3788 fixed the font issues there.
this is what I see:

 <!-- this exact same block is printed three times in a row -->
Debug [Main]: FONT LOADED family: "Open Sans" style: "Light" point sizes: "6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72"
Debug [Main]: FONT LOADED family: "Open Sans" style: "Bold Italic" point sizes: "6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72"
Debug [Main]: FONT LOADED family: "Open Sans" style: "Condensed Light Italic" point sizes: "6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72"
Debug [Main]: FONT LOADED family: "Open Sans" style: "Semibold" point sizes: "6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72"
Debug [Main]: FONT LOADED family: "Open Sans" style: "SemiBold Italic" point sizes: "6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72"
Debug [Main]: FONT LOADED family: "Open Sans" style: "Extrabold" point sizes: "6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72"
Debug [Main]: FONT LOADED family: "Open Sans" style: "Light Italic" point sizes: "6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72"
Debug [Main]: FONT LOADED family: "Open Sans" style: "ExtraBold Italic" point sizes: "6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72"
Debug [Main]: FONT LOADED family: "Open Sans" style: "Extrabold Italic" point sizes: "6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72"
Debug [Main]: FONT LOADED family: "Open Sans" style: "Italic" point sizes: "6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72"
Debug [Main]: FONT LOADED family: "Open Sans" style: "Bold" point sizes: "6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72"
Debug [Main]: FONT LOADED family: "Open Sans" style: "Condensed Light" point sizes: "6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72"
Debug [Main]: FONT LOADED family: "Open Sans" style: "Regular" point sizes: "6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72"
Debug [Main]: FONT LOADED family: "Open Sans" style: "Semibold Italic" point sizes: "6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72"
Debug [Main]: FONT LOADED family: "Open Sans" style: "ExtraBold" point sizes: "6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72"
...
Debug [Main]: FONT LOADED family: "Ubuntu" style: "Light Italic" point sizes: "6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72"
...

@ronso0 ronso0 marked this pull request as ready for review May 3, 2021 23:15
@Holzhaus
Copy link
Member

Holzhaus commented May 4, 2021

Debug [Main]: Loading resources from  "/home/jan/Projects/mixxx/res/"
Debug [Main]: FONT LOADED family: "Open Sans" style: "Italic" point sizes: "6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72"
Debug [Main]: FONT LOADED family: "Open Sans" style: "Regular" point sizes: "6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72"
Debug [Main]: FONT LOADED family: "Open Sans" style: "SemiBold" point sizes: "6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72"
Debug [Main]: FONT LOADED family: "Open Sans" style: "SemiBold Italic" point sizes: "6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72"
Debug [Main]: FONT LOADED family: "Open Sans" style: "Light" point sizes: "6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72"
Debug [Main]: FONT LOADED family: "Open Sans" style: "Bold" point sizes: "6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72"
Debug [Main]: FONT LOADED family: "Open Sans" style: "Light Italic" point sizes: "6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72"
Debug [Main]: FONT LOADED family: "Open Sans" style: "ExtraBold" point sizes: "6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72"
Debug [Main]: FONT LOADED family: "Open Sans" style: "Bold Italic" point sizes: "6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72"
Debug [Main]: FONT LOADED family: "Open Sans" style: "ExtraBold Italic" point sizes: "6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72"
Debug [Main]: FONT LOADED family: "Open Sans" style: "Italic" point sizes: "6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72"
Debug [Main]: FONT LOADED family: "Open Sans" style: "Regular" point sizes: "6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72"
Debug [Main]: FONT LOADED family: "Open Sans" style: "SemiBold" point sizes: "6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72"
Debug [Main]: FONT LOADED family: "Open Sans" style: "SemiBold Italic" point sizes: "6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72"
Debug [Main]: FONT LOADED family: "Open Sans" style: "Light" point sizes: "6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72"
Debug [Main]: FONT LOADED family: "Open Sans" style: "Bold" point sizes: "6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72"
Debug [Main]: FONT LOADED family: "Open Sans" style: "Light Italic" point sizes: "6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72"
Debug [Main]: FONT LOADED family: "Open Sans" style: "ExtraBold" point sizes: "6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72"
Debug [Main]: FONT LOADED family: "Open Sans" style: "Bold Italic" point sizes: "6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72"
Debug [Main]: FONT LOADED family: "Open Sans" style: "ExtraBold Italic" point sizes: "6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72"
Debug [Main]: FONT LOADED family: "Open Sans" style: "Italic" point sizes: "6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72"
Debug [Main]: FONT LOADED family: "Open Sans" style: "Regular" point sizes: "6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72"
Debug [Main]: FONT LOADED family: "Open Sans" style: "SemiBold" point sizes: "6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72"
Debug [Main]: FONT LOADED family: "Open Sans" style: "SemiBold Italic" point sizes: "6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72"
Debug [Main]: FONT LOADED family: "Open Sans" style: "Light" point sizes: "6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72"
Debug [Main]: FONT LOADED family: "Open Sans" style: "Bold" point sizes: "6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72"
Debug [Main]: FONT LOADED family: "Open Sans" style: "Light Italic" point sizes: "6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72"
Debug [Main]: FONT LOADED family: "Open Sans" style: "ExtraBold" point sizes: "6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72"
Debug [Main]: FONT LOADED family: "Open Sans" style: "Bold Italic" point sizes: "6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72"
Debug [Main]: FONT LOADED family: "Open Sans" style: "ExtraBold Italic" point sizes: "6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72"
Debug [Main]: FONT LOADED family: "Open Sans" style: "Semibold" point sizes: "6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72"
Debug [Main]: FONT LOADED family: "Ubuntu" style: "Bold" point sizes: "6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72"
Debug [Main]: FONT LOADED family: "Ubuntu" style: "Light Italic" point sizes: "6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72"
Debug [Main]: FONT LOADED family: "Ubuntu" style: "Light" point sizes: "6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72"
Debug [Main]: FONT LOADED family: "Ubuntu" style: "Medium Italic" point sizes: "6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72"
Debug [Main]: FONT LOADED family: "Ubuntu" style: "Regular" point sizes: "6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72"
Debug [Main]: FONT LOADED family: "Ubuntu" style: "Bold Italic" point sizes: "6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72"
Debug [Main]: FONT LOADED family: "Ubuntu" style: "Italic" point sizes: "6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72"
Debug [Main]: FONT LOADED family: "Ubuntu" style: "Medium" point sizes: "6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72"
Debug [Main]: FONT LOADED family: "Ubuntu" style: "Bold" point sizes: "6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72"
Debug [Main]: FONT LOADED family: "Ubuntu" style: "Light Italic" point sizes: "6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72"
Debug [Main]: FONT LOADED family: "Ubuntu" style: "Light" point sizes: "6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72"
Debug [Main]: FONT LOADED family: "Ubuntu" style: "Medium Italic" point sizes: "6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72"
Debug [Main]: FONT LOADED family: "Ubuntu" style: "Regular" point sizes: "6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72"
Debug [Main]: FONT LOADED family: "Ubuntu" style: "Bold Italic" point sizes: "6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72"
Debug [Main]: FONT LOADED family: "Ubuntu" style: "Italic" point sizes: "6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72"
Debug [Main]: FONT LOADED family: "Ubuntu" style: "Medium" point sizes: "6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72"
Info [Main]: DbConnection - Available drivers for database connections: ("QIBASE", "QSQLITE", "QMARIADB", "QMYSQL", "QMYSQL3", "QODBC", "QODBC3", "QPSQL", "QPSQL7", "QTDS", "QTDS7")

@Holzhaus
Copy link
Member

Holzhaus commented May 4, 2021

Headers are still bold:
Screenshot from 2021-05-04 12-54-01

@ronso0
Copy link
Member Author

ronso0 commented May 4, 2021

We know Qt versions make a difference so I assume it's an qss issue again.

To be 100% sure the c++ change is in place I explicitely setHighlightSections(false), rebased and force-pushed.
I also adjusted the qss to explicitely include QHeaderView::section. Maybe that makes a difference for you.

For me, the original issue with bold headers is resolved, the headers are semi-bold, both in the focused and unfocused table:
image

Ready for merge.

Meanwhile I'll build the Qt 5.15.2 sources and see if I can debug the remaining font & icon issues.

@Holzhaus
Copy link
Member

Holzhaus commented May 4, 2021

I think it works now, thanks.

Screenshot from 2021-05-04 20-25-25

@Holzhaus Holzhaus merged commit 3caed0a into mixxxdj:2.3 May 4, 2021
2.3 release automation moved this from In progress to Done May 4, 2021
@ronso0 ronso0 deleted the headerhighlight branch May 4, 2021 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
2.3 release
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants