Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
dominichayesferen opened this issue Sep 24, 2021 · 9 comments · May be fixed by #30
Closed

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

dominichayesferen opened this issue Sep 24, 2021 · 9 comments · May be fixed by #30

Comments

@dominichayesferen
Copy link

dominichayesferen commented Sep 24, 2021

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.

@alatiera
Copy link
Contributor

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 #30 is doing and patch GTK's default itself.

@dominichayesferen
Copy link
Author

dominichayesferen commented Sep 25, 2021

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
Copy link
Author

Possibly related: #30

@tintou
Copy link
Member

tintou commented Feb 2, 2023

This is because of flatpak/flatpak#4873

@Marukesu
Copy link
Contributor

Marukesu commented Feb 2, 2023

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).

@dominichayesferen
Copy link
Author

dominichayesferen commented Feb 2, 2023

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 elementary/granite#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
Copy link
Author

dominichayesferen commented Mar 24, 2023

Nevermind, work is in progress to effectively put the stylesheet inside Granite itself(?), presumably also fixing this issue
elementary/granite#639

@dominichayesferen
Copy link
Author

I'm assuming elementary/granite@6f035b7 means that once the next Granite release happens this bug can be closed as FIXED?

@dominichayesferen
Copy link
Author

dominichayesferen commented May 10, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging a pull request may close this issue.

4 participants