missing icons for "new file" and "image" buttons in toolbar with Humanity theme
Description There are missing icons for "new file" and "image" buttons in toolbar with Humanity theme. Note: the "New file" icon does show up properly in other apps like xed, I could not find one using the "image" icon.
To Reproduce
- install LM 22
- make Humanity theme available (sudo ln -s /usr/share/icons/Humanity /usr/share/icons/Mint-Humanity)
- select Humanity icon theme in Themes setting
- install Pinta 3.0 from Flathub
- launch Pinta
Additional Info
vs
Version Pinta 3.0, Linux Mint 22 .
Hmm, I think these are standard icons so I'm wondering if they're missing from your icon theme somehow? Those two icon names are
document-new-symbolicimage-x-generic-symbolic
An example of an icon that is appearing properly is the open folder icon (document-open-symbolic) , so could you try checking the icon theme's folder to see what's present?
Looks like those two are indeed missing. I only see these:
- document-new
- image-x-generic
but not the -symbolic variant of either.
Here are all of the instances of the icons I could find:
$ find /usr/share/icons/ -name document-new-symbolic.* /usr/share/icons/Yaru/scalable/actions/document-new-symbolic.svg /usr/share/icons/Adwaita/symbolic/actions/document-new-symbolic.svg /usr/share/icons/Mint-X/actions/scalable/document-new-symbolic.svg /usr/share/icons/Papirus/symbolic/actions/document-new-symbolic.svg /usr/share/icons/Papirus-Dark/symbolic/actions/document-new-symbolic.svg
$ find /usr/share/icons/ -name image-x-generic-symbolic.* /usr/share/icons/Yaru/scalable/mimetypes/image-x-generic-symbolic.svg /usr/share/icons/Adwaita/symbolic/mimetypes/image-x-generic-symbolic.svg /usr/share/icons/Papirus/symbolic/mimetypes/image-x-generic-symbolic.svg /usr/share/icons/Papirus-Dark/symbolic/mimetypes/image-x-generic-symbolic.svg
Humanity does inherit from Adwaita, but that apparently does not help.
Also Mint-Y (which does work) also inherits from Adwaita. Really confusing...
Hmm, for comparison, what happens if you search for one of the working icons like document-open?
$ find /usr/share/icons/ -name document-open.* /usr/share/icons/Humanity/actions/16/document-open.svg /usr/share/icons/Humanity/actions/48/document-open.svg /usr/share/icons/Humanity/actions/24/document-open.svg /usr/share/icons/Yaru/16x16/actions/document-open.png /usr/share/icons/Yaru/32x32/actions/document-open.png /usr/share/icons/Yaru/24x24@2x/actions/document-open.png /usr/share/icons/Yaru/48x48@2x/actions/document-open.png /usr/share/icons/Yaru/256x256@2x/actions/document-open.png /usr/share/icons/Yaru/32x32@2x/actions/document-open.png /usr/share/icons/Yaru/256x256/actions/document-open.png /usr/share/icons/Yaru/16x16@2x/actions/document-open.png /usr/share/icons/Yaru/24x24/actions/document-open.png /usr/share/icons/Yaru/48x48/actions/document-open.png /usr/share/icons/Yaru/22x22@2x/actions/document-open.png /usr/share/icons/Yaru/22x22/actions/document-open.png /usr/share/icons/HighContrast/16x16/actions/document-open.png /usr/share/icons/HighContrast/scalable/actions/document-open.svg /usr/share/icons/HighContrast/32x32/actions/document-open.png /usr/share/icons/HighContrast/256x256/actions/document-open.png /usr/share/icons/HighContrast/24x24/actions/document-open.png /usr/share/icons/HighContrast/48x48/actions/document-open.png /usr/share/icons/HighContrast/22x22/actions/document-open.png /usr/share/icons/Mint-X/actions/16/document-open.png /usr/share/icons/Mint-X/actions/48/document-open.png /usr/share/icons/Mint-X/actions/32/document-open.png /usr/share/icons/Mint-X/actions/24/document-open.png /usr/share/icons/Mint-X/actions/22/document-open.png /usr/share/icons/Papirus/16x16/actions/document-open.svg /usr/share/icons/Papirus/24x24/actions/document-open.svg /usr/share/icons/Papirus/22x22/actions/document-open.svg /usr/share/icons/Papirus/18x18/actions/document-open.svg /usr/share/icons/Papirus-Dark/16x16/actions/document-open.svg /usr/share/icons/Papirus-Dark/24x24/actions/document-open.svg /usr/share/icons/Papirus-Dark/22x22/actions/document-open.svg /usr/share/icons/Papirus-Dark/18x18/actions/document-open.svg /usr/share/icons/ePapirus-Dark/16x16/actions/document-open.svg /usr/share/icons/ePapirus-Dark/24x24/actions/document-open.svg /usr/share/icons/ePapirus-Dark/22x22/actions/document-open.svg /usr/share/icons/ePapirus-Dark/18x18/actions/document-open.svg /usr/share/icons/Mint-Y/legacy/512/document-open.png /usr/share/icons/Mint-Y/legacy/16/document-open.png /usr/share/icons/Mint-Y/legacy/48/document-open.png /usr/share/icons/Mint-Y/legacy/32/document-open.png /usr/share/icons/Mint-Y/legacy/24/document-open.png /usr/share/icons/Mint-Y/legacy/22/document-open.png /usr/share/icons/Mint-L/legacy/512/document-open.png /usr/share/icons/Mint-L/legacy/16/document-open.png /usr/share/icons/Mint-L/legacy/48/document-open.png /usr/share/icons/Mint-L/legacy/32/document-open.png /usr/share/icons/Mint-L/legacy/24/document-open.png /usr/share/icons/Mint-L/legacy/22/document-open.png /usr/share/icons/ePapirus/16x16/actions/document-open.svg /usr/share/icons/ePapirus/24x24/actions/document-open.svg /usr/share/icons/ePapirus/22x22/actions/document-open.svg /usr/share/icons/ePapirus/18x18/actions/document-open.svg /usr/share/icons/gnome/16x16/actions/document-open.png /usr/share/icons/gnome/32x32/actions/document-open.png /usr/share/icons/gnome/256x256/actions/document-open.png /usr/share/icons/gnome/24x24/actions/document-open.png /usr/share/icons/gnome/48x48/actions/document-open.png /usr/share/icons/gnome/22x22/actions/document-open.png
Sorry, I meant to check for document-open-symbolic to see if there are any differences from document-new-symbolic that explain why it might not show up
I tried replacing document-new-symbolic.svg in Adwaita with document-open-symbolic.svg, but that did not make any difference, so I don't think it's anything in the SVG file.
Not really sure what else to suggest, since it's probably an issue with the custom icon theme, but you could try launching with GTK_DEBUG environment variable set to either icontheme or iconfallback to get some additional info from GTK https://docs.gtk.org/gtk4/running.html#gtk_debug
The iconfallback option indeed lists several icons where no icon or fallback is found:
$ GTK_DEBUG=iconfallback flatpak run com.github.PintaProject.Pinta
No icon found in Mint-Humanity (or fallbacks) for: Cursor.RectangleSelect.png
No icon found in Mint-Humanity (or fallbacks) for: Cursor.EllipseSelect.png
No icon found in Mint-Humanity (or fallbacks) for: Cursor.LassoSelect.png
No icon found in Mint-Humanity (or fallbacks) for: Cursor.MagicWand.png
No icon found in Mint-Humanity (or fallbacks) for: Cursor.Paintbrush.png
No icon found in Mint-Humanity (or fallbacks) for: Cursor.Pencil.png
No icon found in Mint-Humanity (or fallbacks) for: Cursor.Eraser.png
No icon found in Mint-Humanity (or fallbacks) for: Cursor.PaintBucket.png
No icon found in Mint-Humanity (or fallbacks) for: Cursor.Gradient.png
No icon found in Mint-Humanity (or fallbacks) for: Cursor.ColorPicker.png
No icon found in Mint-Humanity (or fallbacks) for: Cursor.Line.png
No icon found in Mint-Humanity (or fallbacks) for: Cursor.Rectangle.png
No icon found in Mint-Humanity (or fallbacks) for: Cursor.RoundedRectangle.png
No icon found in Mint-Humanity (or fallbacks) for: Cursor.Ellipse.png
No icon found in Mint-Humanity (or fallbacks) for: Cursor.FreeformShape.png
No icon found in Mint-Humanity (or fallbacks) for: Cursor.CloneStamp.png
No icon found in Mint-Humanity (or fallbacks) for: Cursor.Recolor.png
...
No icon found in Mint-Humanity (or fallbacks) for: document-new-symbolic-ltr, document-new-symbolic, document-new-ltr, document-new
No icon found in Mint-Humanity (or fallbacks) for: edit-undo-symbolic-ltr, edit-undo-symbolic, edit-undo-ltr, edit-undo
No icon found in Mint-Humanity (or fallbacks) for: edit-redo-symbolic-ltr, edit-redo-symbolic, edit-redo-ltr, edit-redo
No icon found in Mint-Humanity (or fallbacks) for: image-x-generic-symbolic-ltr, image-x-generic-symbolic, image-x-generic-ltr, image-x-generic
...
For icontheme, the log is attached.
Yeah, from the icon theme log it doesn't seem like it finds the document-new icon anywhere, whereas it does list the document-open icon when it dumps out the icon theme's contents at the beginning.
I don't see any mention in the logs of /usr/share/icons/Humanity though, but that might be related to Flatpak's sand boxing causing the paths to be remapped
I'm kind of suspicious about something theme-related not making it through the Flatpak sandbox, but I don't really know enough about this area to give more suggestions - this could be something to ask on a Flatpak forum since it's likely not specific to Pinta itself e.g. https://askubuntu.com/questions/1403931/how-to-apply-system-theme-to-flatpak-apps-that-use-gtk4/1540178#1540178 might have some ideas?
I can confirm the same happens when installed through the snap package on Kubuntu 24.04.2
I can confirm the same happens when installed through the snap package on Kubuntu 24.04.2
Is that also with the same Humanity icon theme as the original report?
Is that also with the same Humanity icon theme as the original report?
That is with the default Kubuntu theme called Breeze.
Would either of you be able to try running Pinta from source? I'd be curious to find out if it's related to the sandboxing of snap and flatpak. If not I can try to get a VM set up for testing this
I can confirm that the compiled version doesn't have the issue. So it seems limited to the Snap version:
I noticed that the compiled version uses a different icon theme which is an important clue. It looks like the Snap version isn't using the default Kubuntu Breeze theme for some reason.
Thank you for testing!
I don't understand Flatpak well enough to comment on that side, but from the Snap side, the icons for Breeze are most likely in the gtk-common-themes snap rather than Pinta itself, and updated externally to Pinta.
I know the Gnome extension for the snap will also do some logic regarding symlinking user directories for the GTK themes, though I'm unsure to what extent, and of course - this is actually GTK running in KDE Plasma, which complicates things a little.
Ultimately it's an interesting one, if I were looking at this purely as a snap problem, I'd presume the issue to be with the Gnome extension or the themes snaps. Since it happens in Flatpak too, it's more likely to be on the Pinta side, as any snap specific solution would be an ecosystem kind of solution where a fix for Pinta is upstream and effects more than Pinta.
@Jaypers could you please run the snap with debugging to compare against the Flatpak?
GTK_DEBUG=iconfallback pinta
@JGCarroll unfortunately I don't use Flatpak and can't comment there but thank you for the pointers I've been able to solve my problem!
I first tried installing gtk-theme-breeze published by KDE but that didn't fix the issue then I installed icon-theme-breeze (also published by KDE) and the problem has been solved:
@arxo since my issue was with Snap in the end, I must apologize for "hijacking" this issue but I thought it was related. Perhaps the solution for Flatpak would be similar?
For the snap, that could be worth bringing up on the Snapcraft forum, as a common theme the desktop integrations should have really handle that magically for you, I'm wondering if icon-theme-breeze might be missing what we'd refer to as a global greedy autoconnection on the server side, or if you yourself don't have snapd-desktop-integration installed which is meant to react to theme changes and the like appropriately (when gtk-common-themes isn't enough but there's individual themes snaps available).
I've Googled Flatpak briefly, from what I expect, it works on a similar model to Snap here, where the themes are themselves Flatpaks, so for @arxo , I'd likely expect they need to install Mint-Humanity as a flatpak. From what I'm reading, Flatpak completely ignores /usr/share/themes but would attempt to automatically install the themes it can recognise in $HOME/.local/share/themes, though I don't have much knowledge and the ecosystem could have changed since; but it does make sense to me that /usr/share/themes is never actually checked.
I managed to find a workaround (inspired by https://itsfoss.com/flatpak-app-apply-theme/) :
- remove the
/usr/share/icons/Mint-Humanitysymlink - copy
/usr/share/icons/Humanityto~/.icons/Mint-Humanity - change the name in
~/.icons/Mint-Humanity/index.themeto Mint-Humanity and save - ensure the
~/.iconsfolder is exposed to Pinta in flatpak (e.g. via flatseal)
Thanks for the update!
I've had a look at Flatpak now, theme Flatpaks are a thing, like theme snaps, e.g.,: https://github.com/flathub/org.gtk.Gtk3theme.Yaru-dark (the Ubuntu theme)
However, searching for Mint-Humanity (or just "Humanity") doesn't reveal anything.
It'd be ideal if the Mint-Humanity developers could upload this to Flathub so that Flatpak can automatically make use of it. Since that isn't the case from what I'm seeing in the Flathub repo, the above approach is the only solution besides changing the theme entirely to avoid the problem; and likely won't cause any problems with Pinta (there were historical concerns about themes back when e.g., GTK2 deployed themes as executable code, which will be why it's not done by default in both package managers).
Well, the Mint-Humanity theme technically does not even exist. Linux Mint's theme selector was changed to only show themes that start with "Mint" (at least those in /usr/share/...). So I could make the Humanity theme available to most applications simply by creating a symlink named Mint-Humanity to the Humanity icon theme folder. I noticed that this does not apply to the ~/.icons , so there the theme name can be anything, as long as it does not clash with a system theme.
FYI, I just opened issue #1836, which is similar to this one but not exactly identical, and looks like a more general problem.