Skip to content
Snippets Groups Projects

qt: use system accent color with Qt >= 6.6 in `SystemPaletteThemeProvider`

Open Fatih Uzunoğlu requested to merge fuzun/vlc:qt/usesystemaccentcolor into master
1 file
+ 5
1
Compare changes
  • Side-by-side
  • Inline
@@ -135,9 +135,13 @@ static int updatePalette(vlc_qt_theme_provider_t* obj)
auto sys = static_cast<SystemePaletteObserver*>(obj->p_sys);
QPalette& palette = sys->m_palette;
#if QT_VERSION >= QT_VERSION_CHECK(6, 6, 0)
QColor accent = palette.color(QPalette::Normal, QPalette::Accent);
QColor accentPressed = accent.lighter(150);
#else
QColor accent = QColor( sys->m_isDark ? "#FF8800" : "#FF610A" );
QColor accentPressed = QColor( sys->m_isDark ? "#e67a30" : "#e65609" );
#endif
QColor textOnAccent = Qt::white;
QColor visualFocus = sys->m_isDark ? Qt::white : Qt::black;
QColor shadow = palette.color(QPalette::Normal, QPalette::Shadow);
Loading