Browse Source

Adjust stylesheets to render menubar items correctly.

There is a *bug in Qt5 (as of 5.3.1) where QMenuBar::items don't inherit their background colors, but revert to default system styling. The work around is to explicitly color their backgrounds.
QGC4.4
Bryant 11 years ago
parent
commit
488c30039e
  1. 8
      files/styles/style-dark.css
  2. 8
      files/styles/style-light.css

8
files/styles/style-dark.css

@ -334,6 +334,14 @@ QMenu::separator { @@ -334,6 +334,14 @@ QMenu::separator {
margin: 8px 5px 4px 5px;
}
/*
* Fix for bug in Qt5 where QMenuBar items are styled natively on Windows, ignoring inherited settings.
* so we explicitly set their background color here (should match catch-all style background color).
*/
QMenuBar::item {
background-color: #222;
}
QMenuBar::item:selected {
background-color: #CCC;
color: #000;

8
files/styles/style-light.css

@ -278,6 +278,14 @@ QMenu::separator { @@ -278,6 +278,14 @@ QMenu::separator {
margin: 8px 5px 4px 5px;
}
/*
* Fix for bug in Qt5 where QMenuBar items are styled natively on Windows, ignoring inherited settings.
* so we explicitly set their background color here (should match catch-all style background color).
*/
QMenuBar::item {
background-color: #F6F6F6;
}
QMenuBar::item:selected {
background-color: #555;
color: #FFF;

Loading…
Cancel
Save