Minor changes in Qt styles handling
Qt has a quirk - if a widget has a custom style sheet, it ignores system style changes. An easy way to reproduce this issue is to start OpenMW's launcher in Windows with the theme which supports a dark mode (-style fusion
, for example) and then switch a dark mode state. As a result, a toolbar with tabs icons does not change its color:
There are at least three ways to avoid such issue:
- Do not use stylesheet where we can avoid them.
- Apply them again when application palette changes where we can not avoid them.
- Reset style sheet for the whole Qt application via
setStyleSheet("")
, but it is a "nuclear" option.
I use 1 and 2 in this MR. Summary of changes:
- Update toolbar style in launcher when application palette changes (as described above).
- Do not use style sheets to make installation method text bold in Wizard to avoid this issue:
- Remove border from status bar. It is inconnsistent anyway (for example,
windowsvista
style applies only right border,windows
style - only right and bottom borders):
Without border it does not look any worse:
- Use an autoraise mode for clear button in the launcher to avoid style sheet, as we do for another icon-based buttons in the launcher. Autoraise mode does not render button's border and background when the button is not hovered or activated.
- Explicitely highlight an Open button in the editor when we enable it:
It already becomes active (you can press Enter to activate it), but some styles do not highlight it (e.g. windows
style).