flatpak-platform icon indicating copy to clipboard operation
flatpak-platform copied to clipboard

GTK settings in distributions like Feren OS is set to an invalid value

Open dominichayesferen opened this issue 3 years ago • 8 comments

I'm not sure if this is entirely related to #1 and #28 and the likes, but just in case it's not known it's causing actual issues in non-elementary-OS scenarios, I thought I'd make this extra issue in case. Feel free to close it if it's indeed a duplicate of any existing issues.

What Happened

Basically elementary OS's applications in the Flatpak format are horribly visually broken in certain, if not all, non-elementary OS environments. A quick DEBUG mode variable shows that the Flatpaks are set to use... nothing (I'm suspecting they're using, in my case, 'feren' and 'Inspire' (the Feren OS theme combo), but since they don't exist inside the Flatpak they're effectively nothing values in the GTK+ debugger).

This is troublesome especially as:

  • Applications requiring elementary OS's stylesheet are either somewhat broken or teetering towards complete unusability
  • Dark mode applications don't get their dark theme applied

Camera (bug in effect): image

Camera (after changing values): image

Fondo (bug in effect, also notice that dark mode doesn't work in this buggy state): image

Fondo (after changing values, dark mode now works): image

Calendar (bug in effect): image

Calendar (after changing values): image

Dippi is the only case I know of of automatic theme setting: image

...and finally, while it isn't in AppCenter currently, I'll just demonstrate the potential unusability this bug could, theoretically, cause using Byte (forced Adwaita values, to illustrate a point): image

Expected Behavior

At the very least, the fallback should be io.elementary.stylesheet.blueberry with elementary icon set

Steps to Reproduce

  1. Add the AppCenter repository to a distribution like Feren OS (is easy enough, just follow Linux Mint's instructions)
  2. Install io.elementary.camera or any other package from AppCenter that's built around elementary OS's theme
  3. Open the newly installed application

Logs

Platform Information

The latest version of Feren OS is in use for this issue report, however I'd suspect this same issue would occur elsewhere, if not just in all KDE Plasma distributions.

dominichayesferen avatar Sep 24 '21 18:09 dominichayesferen

I'm suspecting they're using, in my case, 'feren' and 'Inspire' (the Feren OS theme combo), but since they don't exist inside the Flatpak they're effectively nothing values in the GTK+ debugger).

That's exactly what's happening, the portal is exposing the string of the host style which is not available inside the sandbox.

I don't think running elementary apps on non-elementary OS is a "supported" usecase as of now. In order to fix this there needs to be a guarantee that the application will be using the correct stylesheet.

Dippi for example explicitly sets the style and icon-theme to elementary. another option would be to have libgranite do it instead to avoid apps having to "opt-in" the non-broken mode, this is what will be happening in libadwaita as well. Or what https://github.com/elementary/flatpak-platform/pull/30 is doing and patch GTK's default itself.

alatiera avatar Sep 25 '21 06:09 alatiera

I think the best port of call WOULD be to have LibGranite do it instead, since it's the elementary OS equivalent of LibAdwaita, technically, and there's no way I'd think in normal usage for there to be other theme choices anyway besides io.elementary.stylesheet.idk or Adwaita. Heck, I thought that was already the case... nevermind.

Obviously you'd still need to support your in-house accent variations, but I'm sure that'd be easy enough to do. I thought I'd make this issue anyway just so that this bug has its own dedicated issue to discuss on, as I would like to make AppCenter an available Flatpak repository in Feren OS some time, but would rather the bugs get ironed out first.

dominichayesferen avatar Sep 25 '21 16:09 dominichayesferen

Possibly related: #30

dominichayesferen avatar Feb 02 '23 05:02 dominichayesferen

This is because of https://github.com/flatpak/flatpak/issues/4873

tintou avatar Feb 02 '23 10:02 tintou

This is because of flatpak/flatpak#4873

i don't think so, the issue here is with apps using the elementary runtime. they have the elementary stylesheet in the sandbox already.

i believe the best solution is go the libadwaita route and have it hardcoded as part of the granite library. #30 has some limitations (won't work for icon themes, fonts, and won't respect the dark theme application preference).

Marukesu avatar Feb 02 '23 17:02 Marukesu

This is because of flatpak/flatpak#4873

i don't think so, the issue here is with apps using the elementary runtime. they have the elementary stylesheet in the sandbox already.

i believe the best solution is go the libadwaita route and have it hardcoded as part of the granite library. #30 has some limitations (won't work for icon themes, fonts, and won't respect the dark theme application preference).

Technically, I think that would be easy enough to implement? - there's already possible reference code in https://github.com/elementary/granite/pull/501 's removals, so I guess it ultimately depends on who gets to doing the pull request first, given I have a suspicion this could be the new goal (given LibAdwaita doing that), to finally close this issue, instead of the current inactive pull request.

dominichayesferen avatar Feb 02 '23 21:02 dominichayesferen

Nevermind, work is in progress to effectively put the stylesheet inside Granite itself(?), presumably also fixing this issue https://github.com/elementary/granite/pull/639

dominichayesferen avatar Mar 24 '23 21:03 dominichayesferen

I'm assuming https://github.com/elementary/granite/commit/6f035b7333ad00a972a78e6c07275a2add361565 means that once the next Granite release happens this bug can be closed as FIXED?

dominichayesferen avatar Apr 11 '23 02:04 dominichayesferen

I suppose, the only thing left now is for Flatpaks to use the updated Granite, hence I'll put this issue out of its misery finally.

dominichayesferen avatar May 10 '24 22:05 dominichayesferen