Skip to content

Added Native Dark Mode For VLC 3.0

Pratik Patel requested to merge pratikpatel8982/vlc:darkmode into 3.0.x

Added Native Dark Mode For VLC 3.0

  • Added Option in Preferences to switch to dark mode. (sprefs-interface.ui)
  • Used the QtStyle option from config.ini to store dark-mode preference (dark-mode is set when QtStyle==QtDark)
  • Applying the styles in qt.cpp
  • Added a new function for Windows so a dark title-bar is enabled when using dark mode.
  • 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)
  • Function calls to the function setDarkTitleBar() or checkAndSetDarkMode() are made to ensure every dialog uses dark title bar.
  • This version of dark mode is based on Fusion

DARK TITLEBAR FOR WINDOWS

  • This is implemented in the files darkmode.hpp and darkmode.cpp.
  • It used dwmapi.dll
  • It uses DwmSetWindowAttribute Function to set DWMWA_USE_IMMERSIVE_DARK_MODE 20 to enable immersive dark titlebar.

BUGS

  • The translations need to be updated as there are many new/changed strings.

PREVIEWS Screenshot_2024-08-24_190946 Screenshot_2024-08-25_150048 Screenshot_2024-08-24_192713

SAMPLE VERSION: Github

Merge request reports