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

Fix applying dark scheme when QT_STYLE_OVERRIDE is set #117

Merged
merged 1 commit into from
Nov 1, 2022

Conversation

polter-rnd
Copy link
Contributor

@polter-rnd polter-rnd commented Oct 31, 2022

When QT_STYLE_OVERRIDE is set to something like Adwaita-dark it breaks the theme since it doesn't apply the corresponding color scheme.
We should check if we should force dark color sheme similarly to how it's done in GnomeSettings::styleNames().

P.S. it's fix for a regression that likely appeared in 28f14d3

@grulja
Copy link
Collaborator

grulja commented Nov 1, 2022

Can you please rebase on top of my last change where I ran clang-formatting?

@grulja
Copy link
Collaborator

grulja commented Nov 1, 2022

I'm not sure it's the right place where to put your fix. Wouldn't https://github.com/FedoraQt/QGnomePlatform/blob/master/src/common/gnomesettings.cpp#L214 be a better place? Do you want to know whether tu use dark theme based on QT_STYLE_OVERRIDE, right?

When QT_STYLE_OVERRIDE is set to something like "Adwaita-dark" it breaks the theme since it doesn't apply the corresponding color scheme.
We should rely on QT_STYLE_OVERRIDE when deciding whether to use the dark theme.

Signed-off-by: Pavel Artsishevsky <[email protected]>
@polter-rnd
Copy link
Contributor Author

Do you want to know whether tu use dark theme based on QT_STYLE_OVERRIDE, right?

Yes, exactly

Wouldn't https://github.com/FedoraQt/QGnomePlatform/blob/master/src/common/gnomesettings.cpp#L214 be a better place?

Seems right, thank you. I've updated my commit, it works this way too.

@grulja grulja merged commit a190218 into FedoraQt:master Nov 1, 2022
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 this pull request may close these issues.

2 participants