qt: Add Dark Mode [Closed due to incorrect rebase] Reopened in !6131
!6131 (merged)
Reopened inAdded Native Dark Mode For VLC 3.0
- Added checkbox in Preferences to switch to dark mode. (
sprefs-interface.ui
) - Added a new function for Windows so a dark title-bar is enabled when using dark mode in
qvlcframe.hpp
. - Modified about.ui file and removed custom stylesheet. Now the stylesheet is applied in the constructor of the About Dialog based on the mode (
help.cpp
). - Dark mode works best with fusion. It is applied dynamically but requires restart to work properly.
DARK TITLEBAR FOR WINDOWS
- This is implemented in the files qvlcframe.hpp.
- It uses
DwmSetWindowAttribute
Function to from thedwmapi.dll
to apply dark titlebar. - Requires Restart.
Enabled the StyleComboBox For Windows:
- Fusion
- Windows
- WindowsXP
- WindowsVista
PREVIEWS:
Merge request reports
Activity
Thanks
Thanks for your contribution!
When all of the following conditions are fulfilled, your MergeRequest will be reviewed by the Team:
- the check pipeline passes
- the MR is considered as 'mergeable' by gitlab
You can find more details about the acceptance process here.
added Component::Interface: Qt Version::3.0.x labels
added MRStatus::NotCompliant label
- Resolved by Rémi Denis-Courmont
Qt should probably be upgraded to last open source 5.15 with provided additional security patches, and this probably should be done regardless of dark theme before 3.0 branch is deprecated.
Once Qt is upgraded to 5.15, it reportedly [1] provides support for dark theme. There is already an option to change the style, I don't think it's good idea to override the selected style as currently dark mode option and the style option conflict with each other (dark mode force enables Fusion style).
[1] https://www.qt.io/blog/dark-mode-on-windows-11-with-qt-6.5
- Resolved by Pratik Patel
added 2 commits
- Resolved by Pratik Patel
- Resolved by Pratik Patel
- Resolved by Pratik Patel
- Resolved by Pierre Lamot
- Resolved by Pratik Patel
added 1 commit
- fcc4b787 - Compile windows-specific file on windows only
added 1 commit
- 2c06f765 - Optimized code and use boolean instead of QtStyle