Browse Source

UI: Fix stats widget appearance on Yami themes

- QSS changes fix background color on the stats dialog.
- Making OBSBasicStats derive from QFrame fixes the background color
and round bottom corners on the stats dock.
tytan652 3 years ago
parent
commit
15689fd4bd

+ 5 - 0
UI/data/themes/Acri.qss

@@ -1514,3 +1514,8 @@ QCalendarWidget QAbstractItemView:disabled {
 QDialogButtonBox {
     dialogbuttonbox-buttons-have-icons: 0;
 }
+
+/* Stats dialog */
+OBSBasicStats {
+    background: palette(dark);
+}

+ 5 - 0
UI/data/themes/Grey.qss

@@ -1502,3 +1502,8 @@ QCalendarWidget QAbstractItemView:disabled {
 QDialogButtonBox {
     dialogbuttonbox-buttons-have-icons: 0;
 }
+
+/* Stats dialog */
+OBSBasicStats {
+    background: palette(dark);
+}

+ 5 - 0
UI/data/themes/Light.qss

@@ -1508,3 +1508,8 @@ QCalendarWidget QAbstractItemView:disabled {
 QDialogButtonBox {
     dialogbuttonbox-buttons-have-icons: 0;
 }
+
+/* Stats dialog */
+OBSBasicStats {
+    background: palette(dark);
+}

+ 5 - 0
UI/data/themes/Rachni.qss

@@ -1506,3 +1506,8 @@ QCalendarWidget QAbstractItemView:disabled {
 QDialogButtonBox {
     dialogbuttonbox-buttons-have-icons: 0;
 }
+
+/* Stats dialog */
+OBSBasicStats {
+    background: palette(dark);
+}

+ 5 - 0
UI/data/themes/Yami.qss

@@ -1506,3 +1506,8 @@ QCalendarWidget QAbstractItemView:disabled {
 QDialogButtonBox {
     dialogbuttonbox-buttons-have-icons: 0;
 }
+
+/* Stats dialog */
+OBSBasicStats {
+    background: palette(dark);
+}

+ 1 - 1
UI/window-basic-stats.cpp

@@ -49,7 +49,7 @@ static QString MakeMissedFramesText(uint32_t total_lagged,
 }
 
 OBSBasicStats::OBSBasicStats(QWidget *parent, bool closeable)
-	: QWidget(parent),
+	: QFrame(parent),
 	  cpu_info(os_cpu_usage_info_start()),
 	  timer(this),
 	  recTimeLeft(this)

+ 1 - 1
UI/window-basic-stats.hpp

@@ -12,7 +12,7 @@
 class QGridLayout;
 class QCloseEvent;
 
-class OBSBasicStats : public QWidget {
+class OBSBasicStats : public QFrame {
 	Q_OBJECT
 
 	QLabel *fps = nullptr;