Parcourir la source

UI: Fix vis. item widget appearance on linux

On linux, the highlighted text color should always be considered
"active"
jp9000 il y a 10 ans
Parent
commit
65ccb2178e
1 fichiers modifiés avec 4 ajouts et 0 suppressions
  1. 4 0
      obs/visibility-item-widget.cpp

+ 4 - 0
obs/visibility-item-widget.cpp

@@ -220,8 +220,12 @@ void VisibilityItemDelegate::paint(QPainter *painter,
 	bool active = option.state.testFlag(QStyle::State_Active);
 	bool active = option.state.testFlag(QStyle::State_Active);
 
 
 	QPalette palette = list->palette();
 	QPalette palette = list->palette();
+#if defined(_WIN32) || defined(__APPLE__)
 	QPalette::ColorGroup group = active ?
 	QPalette::ColorGroup group = active ?
 		QPalette::Active : QPalette::Inactive;
 		QPalette::Active : QPalette::Inactive;
+#else
+	QPalette::ColorGroup group = QPalette::Active;
+#endif
 
 
 #ifdef _WIN32
 #ifdef _WIN32
 	QPalette::ColorRole highlightRole = QPalette::WindowText;
 	QPalette::ColorRole highlightRole = QPalette::WindowText;