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

Stop applying the Adwaita color palette to Kirigami apps #131

Closed
naipotato opened this issue Mar 6, 2023 · 4 comments · Fixed by #132
Closed

Stop applying the Adwaita color palette to Kirigami apps #131

naipotato opened this issue Mar 6, 2023 · 4 comments · Fixed by #132

Comments

@naipotato
Copy link

From a recent post by a GNOME designer1, it was found that QGnomePlatform would be causing black-on-black problems in Kirigami apps, due to applying the Adwaita-qt color palette indiscriminately to any Qt app.

Since according to the README, this project aims to apply GNOME settings to unmodified Qt apps, I suggest at least finding some way to avoid applying the Adwaita color palette on Kirigami apps.

Other parts of QGnomePlatform (like decorations) are still useful for Kirigami apps, so those should still work.

Footnotes

  1. https://mastodon.social/@tbernard/109897404484985777

@naipotato naipotato changed the title Stop applying the QGnomePlatformTheme to Kirigami apps Stop applying the Adwaita color palette to Kirigami apps Mar 6, 2023
@grulja
Copy link
Collaborator

grulja commented Mar 7, 2023

I've been trying to figure out how to identify Kirigami apps from QGnomePlatform, but I have no idea how to do that. Any idea?

@nicolasfella
Copy link

Kirigami isn't strictly the problem here, it's qqc2-desktop-style (which many Kirigami apps force because there is no better style available). qqc2-desktop-style uses KColorScheme (which is kind of a superset of QPalette) to do colors. The problem here is that 1) QPalette and KColorScheme are out of sync (QGnomePlatform applies Awaita colors to QPalette but KColorScheme still uses the builting Breeze default) and 2) KColorScheme knows more color roles than QPalette

I see multiple possible solutions to this:

  1. Someone creates a native Adwaita QtQuick style and QGnomePlatform applies that to apps
  2. Someone creates a KColorScheme file with Adwaita colors and applies that to apps
  3. Someone finds a way to "derive" a KColorScheme from a QPalette and adds that to the relevant code

@nicolasfella
Copy link

Note that the problem isn't even specific to QML. Widgets apps sometimes use KColorScheme too and then have the same problem. try e.g. Kate on Gnome with a dark theme, there will be parts of the colors wrong

@nicolasfella
Copy link

Someone creates a KColorScheme file with Adwaita colors and applies that to apps

To do this create an "adwaita.colors", install it and from QGnomePlatform do qApp->setProperty("KDE_COLOR_SCHEME_PATH", "/usr/share/color-schemes/adwaita.colors");

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

Successfully merging a pull request may close this issue.

3 participants