nullobsi / cantata

Qt Graphical MPD Client
GNU General Public License v3.0
28 stars 2 forks source link

Icons issue #16

Open xfzv opened 2 months ago

xfzv commented 2 months ago

First of all, huge thanks for maintaining this Qt6 fork!

I'm using Gentoo with AwesomeWM. I compiled from source with:

https://github.com/nullobsi/cantata/blob/cf195772188772363b5326c9f227d9efb41fe438/INSTALL#L4-L6

icons

As you can see on the screenshot:

% eix -cI media-fonts/fontawesome                                                                                             
[I] media-fonts/fontawesome (6.1.1(0/6)@07/06/2024): The iconic font

% equery u media-fonts/fontawesome
[ Legend : U - final flag setting for installation]
[        : I - package is installed with flag     ]
[ Colors : set, unset                             ]
 * Found these USE flags for media-fonts/fontawesome-6.1.1:
 U I
 + + X   : Add support for X11
 + + otf : Install OpenType font versions
 - - ttf : Install TrueType font versions

I tried updating media-fonts/fontawesome to ~6.5.1 and using ttf USE flag instead of otf (followed by fc-cache -r) but it doesn't make any difference.

nullobsi commented 1 month ago

So, the fonts are included inside the executable and are rendered by QResource. Do you have some custom Qt theme? What happens if you disable the theme?

nullobsi commented 1 month ago

The PR linked should fix the menu-icon issue, as long as you enable it in your QT platform.

xfzv commented 1 month ago

Thank you! Can confirm icons in right-click menu are now displayed after updating to https://github.com/nullobsi/cantata/commit/0d463d7c7ad55e1f06159eea0ce3b6482bd52a5f

1

Do you have some custom Qt theme?

Yes, I'm using Monochrome KDE.

The two other issues (cropped icons and wrong "Repeat" icon) occur even with other Qt themes (tried KvArc, KvGnome and KvOxygen in Kvantum).

nullobsi commented 1 month ago

I can't reproduce this on my individual setup, but it is probably related to font-rendering (since the FA icons are rendered as a font). From your screenshots it appears the icons that are just SVGs seem fine (the LastFM logo, the "pacman" consume icon, and the application icon).

To help rule out some things:

(my system is running Chimera Linux, but Kvantum doesn't cause issues :p)

xfzv commented 1 month ago

Do you use any GUI scaling options in X11 or Qt?

Do you have any strange FontConfig rules? (i doubt this would affect it, but it's worth a shot)

No, I don't.

Can you try using Fusion (the default theme) instead of Kvantum to see if it's an issue there?

I've just tried Fusion in Qt6ct, it doesn't make any difference.

This seems to be a Gentoo specific issue: I've just installed cantata-qt6-git (AUR) on my Arch Linux system with the same setup (X11 / AwesomeWM) and the icons look just fine.

Not sure if this could be relevant, but cantata is printing the following (on my Gentoo install):

qt.gui.imageio: libpng warning: iCCP: known incorrect sRGB profile
qt.gui.imageio: libpng warning: known incorrect sRGB profile
qt.gui.imageio: libpng warning: profile matches sRGB but writing iCCP instead
qt.gui.imageio: libpng warning: known incorrect sRGB profile
qt.gui.imageio: libpng warning: profile matches sRGB but writing iCCP instead
qt.gui.imageio: libpng warning: known incorrect sRGB profile
qt.gui.imageio: libpng warning: profile matches sRGB but writing iCCP instead
qt.gui.imageio: libpng warning: profile 'Custom': 'CMYK': invalid ICC profile color space
qt.gui.imageio: libpng warning: known incorrect sRGB profile
qt.gui.imageio: libpng warning: profile matches sRGB but writing iCCP instead
nullobsi commented 1 month ago

I don't think that's relevant since I also get those messages (I think they're related to the cover-art images somehow)

Since it appears to be limited to at least gentoo, it makes me think there's a difference in the way it handles fonts for some reason. I will leave this issue open because there is probably a way to mitigate it on this end, and there might be other distros with this effect.

xfzv commented 1 month ago

FWIW, I've just tried on another machine with Gentoo and KDE Plasma (Wayland) instead of AwesomeWM: everything is fine regarding icons.

xfzv commented 1 week ago

Plasma 6 was stabilized on Gentoo. After updating on my machine, the issue persists.