FedoraQt / adwaita-qt

A style to bend Qt applications to look like they belong into GNOME Shell
Other
488 stars 48 forks source link

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

Closed rokm closed 4 years ago

rokm commented 4 years ago

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 commented 4 years ago

Should be fixed with https://github.com/FedoraQt/adwaita-qt/commit/d1e76197e5db24b6d1d286c6e73439d4b1a0500a. 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 commented 4 years ago

I will backport this to Fedora.

rokm commented 4 years ago

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 commented 2 years ago

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