Missing SVG skin icons with libKF5IconThemes5 5.80

Bug #1922966 reported by Attila Schler
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mixxx
Fix Released
High
ronso0
kiconthemes (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

After a system update artwork pics somehow become missing in Mixxx for me and for others. This problem may affect others and other distributions in the future with forthcoming system updates.

More info:
https://mixxx.discourse.group/t/missing-artwork-pics-in-manjaro/21683

I attached my screenshot.

Mixxx 2.3.0-beta build 2.3 r8121

Operating System: openSUSE Tumbleweed 20210401
KDE Plasma Version: 5.21.3
KDE Frameworks Version: 5.80.0
Qt Version: 5.15.2
Kernel Version: 5.11.6-1-default
OS Type: 64-bit
Graphics Platform: X11
Processors: 4 × Intel® Core™ i5-2540M CPU @ 2.60GHz
Memory: 15,5 GiB of RAM
Graphics Processor: Mesa DRI Intel® HD Graphics 3000

Tags: gui skin
Revision history for this message
Attila Schler (atskler) wrote :
Revision history for this message
Uwe Klotz (uklotzde-deactivatedaccount) wrote : Re: Missing skin icons

The term "artwork" is usually used for "cover art" in Mixxx which is a very different topic. These are SVG skin icons that are loaded as Qt resources.

summary: - Missing Artwork Pics
+ Missing skin icons
summary: - Missing skin icons
+ Missing SVG skin icons
tags: added: gui skin
Revision history for this message
ronso0 (ronso0) wrote : Re: Missing SVG skin icons

some findings from the screenshot and the related Zulip thread
https://mixxx.zulipchat.com/#narrow/stream/109122-general/topic/icon.20set.20issues.20with.20last.202.2E3.20beta.20update

SVG loaded
* set in xml templates (button border, sliders, knobs ...)
* button borders set in external style sheet:
   border-image: url(skin:btn_border.svg) 2 2 2 2;

SVG not loaded
* button background set in external style sheet:
   image: url(skin:btn1.svg) no-repeat center center;

Revision history for this message
Jan Holthuis (holthuis-jan) wrote :

> image: url(skin:btn1.svg) no-repeat center center;

Shouldn't this be "background-image"? Maybe that is the issue.

Revision history for this message
Attila Schler (atskler) wrote :

Dear Uwe, I just used the wording from the discourse topic.

I attached another screenshot with QT_SCREEN_SCALE_FACTORS=1.34, here most of the missing SVG skin icons replaced with white file icons.

If you can please set the milestone of this issue to 2.3.0

Revision history for this message
ronso0 (ronso0) wrote :

unfortunately not. Qt has some properties in addition to css2
https://doc.qt.io/qt-5/stylesheet-reference.html#image-prop
and "image" works for QLabel and QPushButton sublasses, even though Qt states:
"This property is for subcontrols only--we don't support it for other elements.
Warning: The QIcon SVG plugin is needed to render SVG images."

Also it was reported PNGs are loaded, see
https://mixxx.zulipchat.com/#narrow/stream/109122-general/topic/icon.20set.20issues.20with.20last.202.2E3.20beta.20update/near/231764966

But it's worth trying "background-image".
Any volunteers?

Revision history for this message
Uwe Klotz (uklotzde-deactivatedaccount) wrote :

I only noticed the confusing wording when receiving the bug notification and first was concerned that our metadata handling was affected instead ;)

Changed in mixxx:
assignee: nobody → Uwe Klotz (uklotzde)
assignee: Uwe Klotz (uklotzde) → nobody
milestone: none → 2.3.0
Revision history for this message
Jan Holthuis (holthuis-jan) wrote :

@ronso0 but what about "no-repeat center center"? I don't see that in the documentation. For alignment, it recommends "image-alignment", so maybe that is the issue?

Revision history for this message
ronso0 (ronso0) wrote :

@Jan
yes, those arguments are superfluos/wrong and are ignored, but since the same line works with an PNG image I very much doubt that's the actual issue. (@Osz tested that, see Zulip link above)

Sure we can move all icons defined via 'image' to 'background' etc. but someone who is affected needs to jump in and verify that it solves the issue before we start a massive PR* just before the release. (massive because I copied the pattern from Deere back then, so Tango, Deere and LateNight are affected now)

@Attila Could you do that? Find the skin folder and edit a few lines in a qss file for testing?

Revision history for this message
Attila Schler (atskler) wrote :

@ronso0

ok, I tried replacing all the "image: url(" to "background: url(" for the svg icons for LateNight Palemoon skin and the result is on the attached screenshot. I'm not sure if I did it without faults.

To the next two post I will attach my modified qss files.

Revision history for this message
Attila Schler (atskler) wrote :
Revision history for this message
Attila Schler (atskler) wrote :
Revision history for this message
ronso0 (ronso0) wrote :

muhaha, I meant to test it in a few places first!

but this is great, thank you!
since you did a blunt find/replace (no offense) we can see where we need to be more careful.

where the library controls also unstyled before?
(preview button, BPM lock, 'Played' checkbox)

ToDo
I'm pretty sure the skin font is not "Open Sans Semibold" while it should be installed by ttf-open-sans or something.

Revision history for this message
ronso0 (ronso0) wrote :

@jan you were right, and I'm puzzled why a newer version of a Qt plugin would be less tolerant...

anyway, I'll address this after I've fixed more relevant issues for Mixxx are 2.3 because other OS would not receive fixes before 2.3.1 while affected Arch users can pull and build the 2.3 branch from github anytime, right?

Revision history for this message
ronso0 (ronso0) wrote :

..also the fix would introduce conflicts with my WIP branch.

Revision history for this message
Attila Schler (atskler) wrote :

@ronso0

I attached again a screenshot with the library and without the qss modifications.

My system font is: PT Sans Caption
The library font settings:
Library Row Height 32 px
Library Font: PT Mono Regular 14pt

Revision history for this message
ronso0 (ronso0) wrote :

@Attila
when you run Mixxx from the command line with the '--developer' argmuent, at startup it will print the detected fonts (and a lot of other stuff you can ignore).
Could you post the font part please?

point is: font names are detected differently depending on various systems. On Ubuntu for example it would print multiple lines with "Open Sans" + font weight, whereas on windows for example Open Sans Semibold is detected as separat font family.
i hope we can debug this so that the correct fonts can be picked with the style sheets regardless of the OS.

Revision history for this message
Attila Schler (atskler) wrote :

@ronso0

I searched for the words ttf, otf, sans, font and I found only this line:

Debug [Main]: No fonts directory found in "/home/atskler/Apps/Installed/MixxxBuild/share/mixxx/"

Revision history for this message
Jan Holthuis (holthuis-jan) wrote :

Ah, fonts are not installed on Linux because they are supposed to be installed via package manager. We should really make this a build flag instead of hardcoding the OS.

Revision history for this message
Attila Schler (atskler) wrote :

After a new system update this issue seems to be gone.

Revision history for this message
ronso0 (ronso0) wrote :

can you post what was updated?

the current (wrong) styling works because the superflous parameters are ignored, and -right now- I'm not very keen on starting to work on a fix.

The font issue should be resolved though, because it makes the outcome of the skin design a bit unpredictable for labels and buttons :\

Revision history for this message
ronso0 (ronso0) wrote :

@Attila
Could try to install the Open Sans bundle and check the log again for Open Sans, and also post a screenshot, too?

Revision history for this message
Attila Schler (atskler) wrote :

@ronso0

The problem caused by libKF5IconThemes5 5.80.0.

With a new version Mixxx works correctly, one or both of these changes fixed the issue:

2021. Mar. 31., Wednesday, 14:00:00 CEST
Hillwood Yang <email address hidden>
- Add 3262669e.patch
  Fix icons can not be shown on some applications (rh#1943807)

2021. Mar. 25., Thursday, 13:00:00 CET
Fabian Vogt <email address hidden>
- Add patch to fix icon loading in some applications (kde#434451):
  * 0001-ensure-qrc-QDir-searchPaths-work-for-icons.patch

.
.

Open Sans: the following package with the following files already installed on my system:

google-opensans-fonts - Humanist Sans Serif Typeface

/usr/share/fonts/truetype
/usr/share/fonts/truetype/OpenSans-Bold.ttf
/usr/share/fonts/truetype/OpenSans-BoldItalic.ttf
/usr/share/fonts/truetype/OpenSans-CondBold.ttf
/usr/share/fonts/truetype/OpenSans-CondLight.ttf
/usr/share/fonts/truetype/OpenSans-CondLightItalic.ttf
/usr/share/fonts/truetype/OpenSans-ExtraBold.ttf
/usr/share/fonts/truetype/OpenSans-ExtraBoldItalic.ttf
/usr/share/fonts/truetype/OpenSans-Italic.ttf
/usr/share/fonts/truetype/OpenSans-Light.ttf
/usr/share/fonts/truetype/OpenSans-LightItalic.ttf
/usr/share/fonts/truetype/OpenSans-Regular.ttf
/usr/share/fonts/truetype/OpenSans-SemiBold.ttf
/usr/share/fonts/truetype/OpenSans-SemiBoldItalic.ttf
/usr/share/licenses/google-opensans-fonts
/usr/share/licenses/google-opensans-fonts/LICENSE.txt

Revision history for this message
Attila Schler (atskler) wrote :

I copied the Open Sans fonts into the following directory:

/home/atskler/Apps/Installed/MixxxBuild/share/mixxx/fonts/

And now the fonts are loaded.

Revision history for this message
Attila Schler (atskler) wrote :
ronso0 (ronso0)
Changed in mixxx:
status: New → Invalid
Revision history for this message
Owen Williams (ywwg) wrote :

This has also affected Ubuntu 21.04. They have not released a fixed package for this issue yet. (redhat has)

Revision history for this message
Daniel Schürmann (daschuer) wrote :

On Ubuntu the current state for libkf5iconthemes5 is this:

bionic (18.04LTS) 5.44.0-0ubuntu1
focal (20.04LTS) 5.68.0-0ubuntu1
groovy (20.10) 5.74.0-0ubuntu1
hirsute (21.04) 5.80.0-0ubuntu1
impish (21.10) 5.82.0-0ubuntu1

So I guess this issue is not yet fixed with Ubuntu hirsute.
I will update the bug status here that others can find it and link it to the upstream package.

Changed in mixxx:
status: Invalid → Confirmed
summary: - Missing SVG skin icons
+ Missing SVG skin icons with libkf5iconthemes5 5.80
Revision history for this message
Daniel Schürmann (daschuer) wrote :

This is the upstream bug https://bugs.kde.org/show_bug.cgi?id=434451
The fix is included from v5.81.0

ronso0 (ronso0)
summary: - Missing SVG skin icons with libkf5iconthemes5 5.80
+ Missing SVG skin icons with libKF5IconThemes5 5.80
Revision history for this message
ronso0 (ronso0) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in kiconthemes (Ubuntu):
status: New → Confirmed
Revision history for this message
ronso0 (ronso0) wrote :

instead of fixing the usage of qss properties (cumbersome, a few visual regressions) we simply replace relative with absolute paths when reading the stylesheets
https://github.com/mixxxdj/mixxx/pull/3877

Changed in mixxx:
importance: Undecided → High
assignee: nobody → ronso0 (ronso0)
Revision history for this message
Daniel Schürmann (daschuer) wrote :

Pinging the package maintainers!
We need here an Upate of the 5.82 version to Hirsute.

Who is able to help?

The package already exists here.

http://ppa.launchpad.net/kubuntu-ppa/backports/ubuntu/pool/main/k/kiconthemes/libkf5iconthemes5_5.82.0-0ubuntu1~ubuntu21.04~ppa1_arm64.deb

I will now copy it to the mixxx ppa

Revision history for this message
Daniel Schürmann (daschuer) wrote :

The backported packages alone is not a good solution, because it depends on other 5.82 packages.
I think we need a patched 5.80 version.

Revision history for this message
ronso0 (ronso0) wrote :

or a patched 5.81 so it gets updated when fetching mixxx-betas?

I'm puzzled why that package isn't updated, yet, especially since it affects quite a few apps.
Or are users supposed to add "Kubuntu-ppa Backports"?
https://www.ubuntuupdates.org/pm/kiconthemes

Revision history for this message
ronso0 (ronso0) wrote :

won't mark as "Fix commited" since both
https://github.com/mixxxdj/mixxx/pull/3877 and
https://github.com/mixxxdj/mixxx/pull/3902
are only workarounds for most skins icons but not for a few plain Qt widgets in the library.

Revision history for this message
ronso0 (ronso0) wrote :

For affected users who don't have the updated libKF5IconThemes5 library (<5.80) in their repo, yet:
we have put the patched library into the mixxx ppas. That way it'll automatically be upgraded when you update Mixxx from the beta or stable ppa
https://launchpad.net/~mixxx/+archive/ubuntu/mixxxbetas
https://launchpad.net/~mixxx/+archive/ubuntu/mixxx
As soon as your repos have the official patched version the one from Mixxx will be skipped.

Others how built Mixxx themselves or prefer to fetch the deb package directly will either have to uninstall libKF5IconThemes5, or find a way to upgrade that library (for example from the kubuntu-backports ppa).

Revision history for this message
ronso0 (ronso0) wrote :

marking as fixed since we did all we can to mitigate the issue.

Changed in mixxx:
status: Confirmed → Fix Committed
Changed in mixxx:
status: Fix Committed → Fix Released
Revision history for this message
Swiftb0y (swiftb0y) wrote :

Mixxx now uses GitHub for bug tracking. This bug has been migrated to:
https://github.com/mixxxdj/mixxx/issues/10390

lock status: Metadata changes locked and limited to project staff
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.