strawberrymusicplayer / strawberry

:strawberry: Strawberry Music Player
https://www.strawberrymusicplayer.org/
GNU General Public License v3.0
2.53k stars 164 forks source link

System icons do not load when Strawberry is compiled from source #1420

Closed peddy22 closed 2 months ago

peddy22 commented 2 months ago

Hi there,

I've tried compiling Strawberry from source, both from the Github latest source files and also from the Debian source files package for a stable release.

Unfortunately when I run it I get this error (many times for all the different icons) 15:08:42.676 WARN IconLoader:87 Couldn't load icon "go-next" from system theme icons. When installing the presupplied Kubuntu package the system icons load fine, when the option is enabled in Settings>Appearance.

Can anyone give me an idea of where to start investigating?

Happens in 1.0.18 as well as the latest github release.

image

jonaski commented 2 months ago

This is a warning not a error. System icons depends on the Qt style which is in use. What icon set is it, specifically what icon names fails to load?

peddy22 commented 2 months ago

Is it because the distro's prepackaged version would use their "stock" System Icons (which I prefer, even tho I can't be sure it's my icon theme) for that setting while my custom icon theme might not have the correct icons available for Strawberry to use?

In that case is it possible to specify which system icon theme to use during compile time?

These are the icons that do not load https://pastebin.com/TJ6N6Kkk

I'm using a custom theme called Candy Icons

peddy22 commented 2 months ago

some icons are loaded, others are not (see circled area)

image

peddy22 commented 2 months ago

Also I noticed my system style does not appear under Appearance, is this because I'm still on QT5?

jonaski commented 2 months ago

Either you need to set the icon theme in KDE, in that case strawberry must be built with the same Qt installation as KDE. Otherwise you need to use qt5ct or qt6ct to set the icon theme, depending on which Qt version you have built strawberry with. Strawberry is not compatible with all icon themes, and there isn't standardized icon names, so even if some icons are loaded because the names are the same, it might not load all of them. Like I've explained many times before we do not have resources in this project to make sure every icon theme works, I prefer if we didn't have the option to use system icons at all.

peddy22 commented 2 months ago

Thanks for the great info. Is it possible to build the latest github Strawberry for QT5 via a simple compile flag?

Cheers

peddy22 commented 2 months ago

I managed to get it with

cmake .. -DBUILD_WITH_QT5=ON

Now everything is working

In my opinion this should be the default when distributions like Kubuntu build their packages, since QT6 will not be adopted for quite some time. For some packages like the latest qbittorrent they are not building it correctly with the QT5 flags. Strawberry seems fine, though.