flathub/org.gimp.GIMP

GTK2 Theming

Closed this issue · 13 comments

Hi there. I'm wondering what people are supposed to do to get their GTK2 themes working in GIMP. I have a theme installed in ~/.themes, and it kind of seems to work, but the Murrine engine is not present in the sandbox so it has all of the colors and none of the actual styling. GTK3 themes in ~/.themes work fine because they don't have any engines at all. I tried installing the Greybird flatpak, because I know its GTK2 variant uses Murrine, thinking it might pull Murrine in with it somehow, but no dice.

Will we need an org.gtk.Gtk2Engines package or something? Should the gnome runtimes be updated to include them?

Jehan commented

Hi,

I know basically nothing about how GTK+2 theme engines work.
From what I understand from what you write, I guess it means we must include the murrine engine for your theme inside the flatpak. But then I guess other engines exist. Should we include all of them to support every theme out there? How many such engines are there?

jurf commented

All of them except for pixmap (included by default, used by Adwaita) are unmaintained. I’d be wary about packaging them TBH.

Wary about packaging them? What for?

Okay, I haven't heard back from this in a while, and I'm still not sure why the GTK2 engines not being maintained would be sufficient rationale for not packaging them and visually breaking every GTK2 application. The GTK2 engines aren't maintained because they're done, essentially.

If the fact that they are unmaintained is a security concern, is it possible to create a flatpak for the GTK2 engines that would be used by any GTK2 app if present, and then leave it to user discretion whether or not to install them?

Jehan commented

Hi!

Actually unless someone really has a huge security concern backed by facts, I would accept a patch to add GTK+2 theme engines to our flatpak (probably as a flatpak extension).

I can't really make the time to add them myself right now, and not sure when I would since my priority list is really packed up. So I am rather expecting working patches from people interested in the features. :-)

Okay. I would like to learn the flatpak packaging process anyways since I'm hoping to get GZDoom into flathub at some point in the future too. How should we approach this? I don't think adding the engines just into GIMP would be a suitable approach because there are other things that use GTK2; namely, all Qt apps when run in a GTK DE. Should they be added into one of the GNOME runtimes or even the Freedesktop base runtime? Would the underlying runtime need to be patched to allow for the extension, or can the extension just insert itself without having to fiddle with the underlying runtime?

@TiZ-EX1 It requires modifying the runtime and I'm not sure if it is something we want to do as it just dramatically increases maintenance burden on themes.

Maintenance burden on themes? Taking a look at how Greybird seems to be laid out, I suppose that makes sense. You'd have to create a 2.24 version of the theme, throw the GTK2 bits in there, and then get the runtime to request it, I guess.

In other situations, I would say that it makes sense to leave GTK2 broken in this regard seeing as it is kind of holding back the future-facing vision of flatpak, and as far as I can tell, GIMP is the only GTK2 app in the repo and soon even it will move to GTK3. But the reason I can't say that is that QGtkStyle has not been updated to use GTK3 and is not going to be. Qt apps will be visually broken in every GTK environment--not just GTK2 ones--without this. Is that a problem we should bother ourselves with?

The Awaita Qt theme is packaged and that covers the GNOME portion of users at least.

That sounds like something a GNOME developer would say. They've always heavily implied that Adwaita is the only supported theme. Is that what Flathub's stance is?

No.. Flathubs stance is its a lot of work to double the number of themes to package.

That's a reasonable stance.

Jehan commented

Ok so after some thinking, I don't think it makes sense to add more theme engine to the GIMP flatpak, but it should be quite easy (well, so I read, I haven't tried!) to create a flatpak extension once our flatpak has an extension point, which is what #22 is about.

I won't create nor maintain said extension (this is not the GIMP team job to maintain every possible software, even if we might use them indirectly). We will just happily provide the extension point for third parties to create/maintain such an extension if wanted.
So I will just close this report, basically considering it as a duplicate of #22.