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

Same QPalette::Mid color in dark and light variant #128

Closed
rokm opened this issue Dec 9, 2019 · 4 comments
Closed

Same QPalette::Mid color in dark and light variant #128

rokm opened this issue Dec 9, 2019 · 4 comments

Comments

@rokm
Copy link
Contributor

rokm commented Dec 9, 2019

I have been looking for a way to fix VirtualBox 6 on my Fedora desktop, where it is suffering from the UI issues with dark theme. In the problematic part of the UI, the VirtualBox performs a decent amount of custom rendering with adjusted colors and gradients derived from the system-defined color palette. However, the main issue appears to be that their colors are based off the QPalette::Mid color.

The QPalette::Mid color in the dark variant of Adwaita is #b4b4b4, the same as for the light variant. According to QPalette documentation, QPalette::Mid should be "Between Button and Dark.", which is not the case here - in fact, in the dark theme, this color ends up being very close to the text color.

Looking at the color palette, it seems that light and dark variant share color definitions for QPalette::Light, QPalette::Midlight, QPalette::Mid, and QPalette::Dark (these colors are probably not defined in the original Gtk theme and are Qt-specific). These colors should probably be adjusted for the dark variant; or at least, the QPalette::Mid should be adjusted (the rest technically match the description from the Qt docs).

@grulja
Copy link
Collaborator

grulja commented Dec 11, 2019

Should be fixed with d1e7619. I set them according to the documentation, where the light color is ligher than the button color, midlight is between them, dark is darker than the button color and mid is between the button and dark color.

I tested it with Virtualbox and the main issue is gone. Still if I go to options, I see the top bar on the right side is still white, but I have no idea why.

@grulja grulja closed this as completed Dec 11, 2019
@grulja
Copy link
Collaborator

grulja commented Dec 11, 2019

I will backport this to Fedora.

@rokm
Copy link
Contributor Author

rokm commented Dec 11, 2019

Should be fixed with d1e7619. I set them according to the documentation, where the light color is ligher than the button color, midlight is between them, dark is darker than the button color and mid is between the button and dark color.

I tested it with Virtualbox and the main issue is gone.

Thanks, this indeed fixes the main issue with the UI!

Still if I go to options, I see the top bar on the right side is still white, but I have no idea why.

That (and couple other quirks) needs to be addressed in the VirtualBox itself.

@John15321
Copy link

Is there any way to submit that to Virtual Box so that they fix that?

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

No branches or pull requests

3 participants