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

Skins :: fix qss icons with kIconThemes 5.80 #3902

Merged
merged 8 commits into from
May 28, 2021

Conversation

ronso0
Copy link
Member

@ronso0 ronso0 commented May 24, 2021

1

missing skin icons due to broken kIconThemes https://www.ubuntuupdates.org/pm/kiconthemes were fixed
BUT that lib forces all image: ... icons to 1:1 aspect ratio while especially LateNight uses different formats.

revival of #3863

For those affected by https://bugs.launchpad.net/mixxx/+bug/1922966
(Arch, Ubuntu 21.04 with kiconthemes installed)

the background shorthand is the only one-line way to achieve the previous look
(alternative: separate background-image, background-position and background-repeat lines...)

 #Hotcue1 WPushButton[displayValue="1"][dark="false"] {
-  image: url(skin:/palemoon/buttons/btn__1_active.svg) no-repeat center center;
+  background: url(skin:/palemoon/buttons/btn__1_active.svg) no-repeat center center;
 }

BUT since we omit background-color transparent bg color is assumed, thus all button background colors must be moved after setting the icons.

In ALL skin

  • all icons show up with appropriate size
  • all button states have the correct background color
  • the logo in the launch screen is sized correctly

2

76db8ba
(included here because don't want to spend the time to rebase. this PR will be finished soon anyway)
In Tango the template and icon paths are skin:../Tango/buttons/... to allow reusing them for Tango64.
After #3877 those paths need to be skin:/../Tango/buttons/... so they're correctly resolved to skins/Tango/buttons/...


3

24c3eaf
use 'background-image' for the default launch image style

@github-actions github-actions bot added the skins label May 24, 2021
@ronso0 ronso0 added this to the 2.3.0 milestone May 24, 2021
@ronso0
Copy link
Member Author

ronso0 commented May 24, 2021

ToDo

  • double check Shade
  • fix LateNight Classic
  • check Deere (little affected at most)

@ronso0 ronso0 force-pushed the skins-qss-icons branch 2 times, most recently from 8d1bb8c to 24c3eaf Compare May 24, 2021 23:28
@ronso0 ronso0 marked this pull request as ready for review May 24, 2021 23:34
@ronso0
Copy link
Member Author

ronso0 commented May 24, 2021

done.

@Holzhaus
Copy link
Member

Thanks. I can test this tomorrow, but who can verify that the fix works? That requires testing by someone who can reproduce the issue in the first place. @ywwg? @daschuer?

@ronso0
Copy link
Member Author

ronso0 commented May 24, 2021

yes @ywwg in case he didn't patch the icon lib, yet.

I tested this myself with Ubuntu 21.04 and that kIconlib installed. This is mostly about making the LateNight main interface look good and Tango usable again.
there are a few minor glitches left with some expand/collapse icons in Deere for example, or some library preview buttons,..
but the effort fixing those is not worth it -- considering that only a few distros are affected and that lib will hopefully be fixed in a few weeks.

@ywwg
Copy link
Member

ywwg commented May 25, 2021

The only issue I see is no bpm lock icon or library triangles on deere 64. Otherwise good!

@daschuer
Copy link
Member

I can confirm that the launch image is no longer squeezed.
The search bar icon is also fixed.
Cue/Play/pause fixed.

The preview button is still squeezed.
The effect button is still broken.

How about creating a PR with only the known working fixes?

I have just contacted the package maintainers Rick and Jose again. Maybe we can solve the root cause with them.
And live with the remaining issues until than.

@ronso0
Copy link
Member Author

ronso0 commented May 26, 2021

Deere64 icons are now visible with the path fix used for Tango already url(skin:/icon/any.svg > url(skin:/../Deere/icon/any.svg

ready!

I have just contacted the package maintainers Rick and Jose again. Maybe we can solve the root cause with them.

They simply need to update the package in the ubuntu main repo to 82. It's already in kubuntu-backport
https://www.ubuntuupdates.org/pm/kiconthemes

And live with the remaining issues until than.

Only issue I'm aware of are squeezed icons / enforced to 1:1 and not scaled: <, >, table sort arrows and the previewbutton in the library. Yes, we can live with that..

@daschuer
Copy link
Member

Can you revert the non working attempt before merge?

@ronso0
Copy link
Member Author

ronso0 commented May 26, 2021

sure, I can squash commits per skin tomorrow.

@ronso0
Copy link
Member Author

ronso0 commented May 26, 2021

it's not non-working, it's two separate steps btw

@daschuer
Copy link
Member

There is no need to squash anything. I just want make sure not to have changes that do not improve the situation but have an regression risk.
During my test I cannot confirm that the preview column is fixed, but there are related changes. The same is true for the effect buttons.

@ronso0
Copy link
Member Author

ronso0 commented May 27, 2021

I checked again: the preview and bpm icons are there in all skins.
we didn't you see it?

@daschuer
Copy link
Member

The preview icon is there but squashed the same goes for the effect combo box.

I have a plain Ubuntu Hirsute with the faulty library installed. I can't reproduce the icon missing issue, only the squashing.

@ywwg ywwg self-requested a review May 27, 2021 23:05
Copy link
Member

@ywwg ywwg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good!

@ronso0
Copy link
Member Author

ronso0 commented May 28, 2021

I can't reproduce the icon missing issue, only the squashing.

that was a regression caused by #3877 affecting Deere64 and Tango64 where (incorrect/incomplete) icon urls in the base skin were not properly resolved. see PR description

The preview icon is there but squashed the same goes for the effect combo box.

To re-cap the consequneces of that broken lib:
previously, we used mostly image for all skin icons

  • all SVG icons would be displayed and scaled properly, regardless if they're oversized (icon_4px.svg) or not
  • the icon size would be taken from the actual size of the SVG, the resizable Preview button the icon (~ 2:1 aspect ratio) would be scaled depending on the column width

now, (with broken kIconThemes)

  • relative paths for SVG icons were ...ignored? thus provide absolute paths with Skins: transform qss icon urls into absolute paths #3877
  • image always assume an aspect ratio of 1:1 (distort all non-square icons) thus use background now, where we accept the consequences:
  • background: color icon repeat position-x position-y does actually scale icons to fit Mixxx widgets -- but that doesn't work for Qt sub-controls, like WEffectSelecotor::down-arrow or QHeaderView::up-arrow, there they're used at real size.
    That does matter Deere where almost all icons are 48x48 pixles. So drop-down arrows, sort arrows etc. would be huge when using background there. with image they're only sueezed.

For the preview button I now decided to go with the fixed-size icons with correct aspect ratio set in default.qss (included at compile time, icons in mixxx.qrc) which will not grow when the library font is increased
instead of a auto-scaling icon which is squeezed (square).

I don't want to spent hours with resizing icons for a skin I don't care about tbh
So, yes, as you said: there are issues users with libKIcon..80 need to live with until that lib is finally updated

Re squeezed effect combobox: please post an example screen.

@daschuer
Copy link
Member

I like to merge this asap. It is kind of unfair to put so much work on you (us), just because the package maintainers are not able to upload the fixed version to the Hirsute Repro.

My original concern was not to commit half baked fixes that will hit us later once the library is updated.

If you can confirm that this is not the case let's just merge this and carry on. Do you?

border: 1px solid transparent;
border-radius: 2px;
}

QPushButton#LibraryPreviewButton:!checked {
image: url(skin:/icon/ic_library_preview_play.svg);
/* TODO ronso0 Restore once fixed lib linKIconThemes (vers. <..80) is in *ubuntu main repos */
/*image: url(skin:/../Deere/icon/ic_library_preview_play.svg);*/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this case a regression for all?
If so I prefere to revert this. The same applies to the other todos.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the only way to get the Preview icons undistorted and adpating to the column width (though not growing with the row height). It's the same for all skins now, and special button styles are not re-implemented, thus the TODOS

so Yes, a regression. with the fixed lib image should work as it did before, and I will revert that asap after the patched libs are in main repos.

@daschuer
Copy link
Member

I have now copied the 5.82 version to our PPA.
Issue fixed :-/

Which changes from this PR are still relevant?

@ronso0
Copy link
Member Author

ronso0 commented May 28, 2021

My original concern was not to commit half baked fixes that will hit us later once the library is updated.

The fixed lib should restore the previous working status of image, not screw it up even more.
There are no halfbaked fixes, and I don't expect any regressions -- unless the fixed lib scres up background, too. but the patch is only about SVG and relative paths, so if I undertstood it correctly the fixed/restired lib shouldn't interfere with our skin stylesheets anymore at all. Basically we could revert the entire PR, but 99% of the changes make skins future-proof.

There are a few places (icons in Deere only IIRC, as well as the Preview button) where we should revert the fixes afterwards to make it look good again.

Ready.

@ronso0
Copy link
Member Author

ronso0 commented May 28, 2021

I have now copied the 5.82 version to our PPA.
Issue fixed :-/

This is not a fix -- it's just a mirror of the kubuntu ppa.
To make use of that/or our ppa users need to

  • complain about it somewhere (best case Mixxx forums)
  • someone knowing about the reason AND the fix has to be around, and then I'd rather recommend them adding the kubuntu ppa instead

As explained this makes skins more immune against future broken libs, and we should revert the few changes marked with TODO soon. I have this package on the radar and will do so asap.

@daschuer
Copy link
Member

daschuer commented May 28, 2021 via email

@ronso0
Copy link
Member Author

ronso0 commented May 28, 2021

@daschuer

From your last response only

.

is visible.

Ready for merge?

@daschuer
Copy link
Member

The PPA solution is a automatic fix for all PPA users.
However, it did not work well, because of missing dependencies of the new package.
I think we need a patched 5.80 version, instead of a full 5.82 version that depends on others.
I have deleted that package form our PPA.

@daschuer
Copy link
Member

So let's merge this now. Thank you for developing the fix.

@daschuer daschuer merged commit 41999e0 into mixxxdj:2.3 May 28, 2021
@ronso0 ronso0 deleted the skins-qss-icons branch May 28, 2021 21:29
@uklotzde
Copy link
Contributor

Some merge conflicts with main need to be resolved.

@ronso0
Copy link
Member Author

ronso0 commented May 30, 2021

I'll take care of that tomorrow.

@ronso0
Copy link
Member Author

ronso0 commented May 30, 2021

Done.

@coolerminds
Copy link

awesome!

ronso0 added a commit to ronso0/mixxx that referenced this pull request May 31, 2021
return to 'image: url(..) no-repeat center center;' for most skin icons
to avoid unscaled, blurry icons when Mixxx is scaled >100% with the 'background: ..'
shorthand at the cost of a lot of squeezed icons for (Linux) users still having
broken libKIconthemes5 5.80 installed.
ronso0 added a commit to ronso0/mixxx that referenced this pull request May 31, 2021
because with scale factors >100% the (vector) icons set with 'background[-mage]'
are not truely scaled up, only their 100% pixmap, which results in blurry/
pixelated icons.
Users still with broken libKIconThemes5 v5.80 have to live with squeezed icons
until they (can) update that lib.
ronso0 added a commit to ronso0/mixxx that referenced this pull request May 31, 2021
because with scale factors >100% the (vector) icons set with 'background[-mage]'
are not truely scaled up, only their 100% pixmap, which results in blurry/
pixelated icons.
Users still with broken libKIconThemes5 v5.80 have to live with squeezed icons
until they (can) update that lib.
ronso0 added a commit to ronso0/mixxx that referenced this pull request Jun 1, 2021
because with scale factors >100% the (vector) icons set with 'background[-mage]'
are not truely scaled up, only their 100% pixmap, which results in blurry/
pixelated icons.
Users still with broken libKIconThemes5 v5.80 have to live with squeezed icons
until they (can) update that lib.
ronso0 added a commit to ronso0/mixxx that referenced this pull request Jun 1, 2021
return to 'image: url(..) no-repeat center center;' for most skin icons
to avoid unscaled, blurry icons when Mixxx is scaled >100% with the 'background: ..'
shorthand at the cost of a lot of squeezed icons for (Linux) users still having
broken libKIconthemes5 5.80 installed.
A patched version of that lib is in the Mixxx 'stable' ppa.
ronso0 added a commit that referenced this pull request Jun 1, 2021
partially revert #3902 Skins: fix qss icons with kIconThemes 5.80
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.

6 participants