linuxmint / lmde6-beta

BETA Bug Squash Rush
5 stars 0 forks source link

gnome: libAdwaita apps do not respect the GTK theme #22

Closed Angedestenebres closed 11 months ago

Angedestenebres commented 12 months ago

Hey :cat2:

As said in the title of this issue, the mint theme doesn't apply on these apps. I guess this is related to GTK4. Not a big issue but harmonization of theming is missing (and normally this is a strong point on Mint 😺 ), see screen.

To reproduce the issue: Boot on the Beta live ISO (without installation) and open these apps. For others, theme is OK.

VirtualBox_LMDE 6 beta_16_09_2023_14_15_45

mtwebster commented 12 months ago

This is unavoidable, as these (and many other) Gnome apps use a new toolkit that will not respect the user's current theme. It will only react to light/dark changes.

clefebvre commented 12 months ago

hmm.. I don't know about that. We can always go back to earlier versions, patch/fork or replace with alternatives. I'll have a look.

clefebvre commented 12 months ago

Ok this affects the following apps:

bobby285271 commented 12 months ago

evolution-data-server is ported to libsoup 3 in debian bookworm, which means pinning gnome-calendar to old gtk3 based versions in theory might require a port to libsoup 3 since processes can only link against one version of libsoup-2.4 and libsoup-3 (even transitively), or there will be symbol clashes (i.e. FTBFS or crashes).

Off-topic: As a downstream packager I really am interested in packaging a fork/replacement if there is one.

clefebvre commented 12 months ago

Some research..

image

Qronikarz commented 12 months ago

hmm.. I don't know about that. We can always go back to earlier versions, patch/fork or replace with alternatives. I'll have a look.

At this point you'd probably need to fork every GNOME app since most of them seem to go into libAdwaita, but that's nothing new: https://joshuastrobl.com/2021/09/14/building-an-alternative-ecosystem/ Budgie and PopOS are moving away from GNOME. Budgie even switched file explorer to Mint's Nemo because it integrates better.

Some libAdwaita apps can be themed using Gradience program, but I don't have any idea how well it would integrate with accent colors that Mint has (maybe the new xdg accent colors standard would help here - https://github.com/flatpak/xdg-desktop-portal/pull/815)

Here's a theme generated in Gradience using the Monet tab where you can select a picture to generate colors from (I chose the screen region of Nemo that is visible on the left here). mintgradience

axel358 commented 12 months ago

I think there are some things that could be done here: 1 Look for gnome apps replacements, for example using thunderbird's calendar instead of gnome's 2 Use already existing forks of gnome apps by the MATE project (wich are very old forks) 3 Fork gnome apps on their last non libadwaita version (this would require additional work) 4 Make our own replacements, while considerably harder, is the ideal solution imo, elementary does this beautifully while still using gnome technologies.

clefebvre commented 12 months ago

@axel358 there's definitely going to be some brainstorming going forward and we'll need a solution in place for Mint 22. In the meantime though, right now for LMDE 6, let's just either patch, backport or ditch. We're not going to start forking projects in a hurry.

clefebvre commented 12 months ago

gnome-font-viewer will be removed.

If people want to install gnome-font-viewer they can. It won't integrate, but as long as it's not something we install by default, it doesn't really matter if it's only designed for GNOME.

Angedestenebres commented 12 months ago

Hey @clefebvre :cat:

Thanks for the reopening of this issue and yes when I posted I also had Mint 22 in mind because we will have this issue too.

For the Calculator, I think the one from MATE project could be a good alternative at least as quick & first action: VirtualBox_LMDE 6 codec bug_19_09_2023_19_19_46 VirtualBox_LMDE 6 codec bug_19_09_2023_19_20_19

Mint Theme is OK on Light & Dark.

For Calendar, I don't have a real alternative except using Thunderbird as already suggested.

However, I don't think we will have alternatives for all Gnome Tools. For instance, Gnome Disk is very useful / simple tool and I guess it will have libAdwaita in the future (maybe it's already the case with the latest version).

Anyway, I think this topic will open discussions for now but also for the future in order to find the best solution in terms of result for users and concerning additional work and I hope this will not add you a lot to do.

axel358 commented 12 months ago

Gparted could be a replacement for disks.

Angedestenebres commented 12 months ago

Gnome Disk is easier to use from my point of view and has interesting features (don't remember to have that in GParted):

We can do that in other way with terminal for instance but this is not for beginners :)

ocobblepot commented 12 months ago

A couple of resources to keep an eye on the Gnome apps and libadwaita.

This page is tracking the porting of apps to GTK4 - https://gitlab.gnome.org/GNOME/Initiatives/-/issues/26

While this page is for Arch Linux, the "Required by" list shows which Gnome apps already depend on libadwaita upstream - https://archlinux.org/packages/extra/x86_64/libadwaita/

clefebvre commented 11 months ago

The following versions were downgraded:

gnome-calendar was versioned 43.really41 to workaround a conflict << 43 in Debian's libgweather4.

Note that although this is gnome-calendar 41, we ported it to libgweather 4, libecal/dataserver 3.45 and soup 3 so that it would work well in Debian 12 / LMDE 6.

gnome-calendar is available as a normal update.

baobab, gnome-calculator and gnome-logs are the same as in Ubuntu 22.04 / Mint 21.x. Because their versions are inferior than the ones whish originally shipped with this BETA, you'll need to use Mintsources -> Maintenance -> Downgrade Foreign Package to get them.

image

With this done we consider the issue solved in LMDE 6.

Going forward, we'll improve GTK4 theming support in time for Mint 22 and we'll see how best to tackle the LibAdwaita issue long-term. This could involve patching libadwaita, patching individual apps, removing them, replacing them, forking/writing new ones.. it's too early to say at this stage.

anaximeno commented 11 months ago

@clefebvre @mtwebster fyi https://github.com/flatpak/xdg-desktop-portal/pull/815

axel358 commented 11 months ago

@anaximeno that'll be good to have support for. But don't think that's the solution here. I think we should stay away from libadwaita apps

anaximeno commented 11 months ago

@anaximeno that'll be good to have support for. But don't think that's the solution here. I think we should stay away from libadwaita apps

People might use these kinds of apps independently if they are used as the default "out of the box" applications or not, so there is a lot to analyze here. But we might see how well they will integrate or not with the system (and the system with them) with time.

dg362 commented 11 months ago

On a standard Debian Bookworm installation, this issue is somewhat 'resolvable' by the use of the GTK_THEME environment variable.

With GTK_THEME not set, Gnome Disks looks like this gnome-disks-no-gtk-theme-set-edit

With GTK_THEME set to Arc-Dark to match my GTK 3 theme manually via export GTK_THEME=Arc-Dark or added to ~/.xsessionrc (or ~/.profile) and logoff/logon or restart session, Gnome Disks looks like this gnome-disks-with-gtk-theme-set-edit

I would also note that I have ~/.config/gtk-3.0/settings.ini with the following content as well although that is not strictly relevant to this point

[Settings]
gtk-application-prefer-dark-theme=1
dominichayesferen commented 11 months ago

GTK_THEME replaces the currently loaded stylesheet, thus making the assumption that Mint-X/Y/L has EVERY LibAdwaita control handled inside itself, which leads to the problems that led to LibAdwaita's 'forced' theme in the first place, so usage of that is a big no no.

If you really need to style LibAdwaita, besides patches like Canonical does it's generally way better to just use ~/.config/gtk-4.0/gtk.css (gtk.css works as a stylesheet overlay instead of a replacement), especially if you manage to make it only target LibAdwaita applications specifically. Note that either way patching LibAdwaita or adding CSS atop it, especially as a distribution, is a big no no and I get the hint Mint doesn't want to do this unless they have to either.