diff src/gui/pages/statistics.cpp @ 37:9ae9365dd4ea

window.cpp: fix sidebar on Linux
author Paper <mrpapersonic@gmail.com>
date Thu, 21 Sep 2023 17:15:43 -0400
parents cde8f67a7c7d
children d0adc4aedfc8
line wrap: on
line diff
--- a/src/gui/pages/statistics.cpp	Thu Sep 21 15:17:47 2023 -0400
+++ b/src/gui/pages/statistics.cpp	Thu Sep 21 17:15:43 2023 -0400
@@ -17,6 +17,10 @@
 	setFrameShape(QFrame::Panel);
 	setFrameShadow(QFrame::Sunken);
 
+	QPalette pal = QPalette();
+	setAutoFillBackground(true);
+	setPalette(pal);
+
 	UiUtils::LabelledTextParagraph* anime_list_paragraph = new UiUtils::LabelledTextParagraph(
 	    "Anime list",
 	    "Anime count:\nEpisode count:\nTime spent watching:\nTime to complete:\nAverage score:\nScore deviation:", "\n\n\n\n\n",
@@ -31,11 +35,6 @@
 	layout()->addWidget(application_paragraph);
 	((QBoxLayout*)layout())->addStretch();
 
-	QPalette pal = QPalette();
-	pal.setColor(QPalette::Window, Qt::white);
-	setAutoFillBackground(true);
-	setPalette(pal);
-
 	QTimer* timer = new QTimer(this);
 	connect(timer, &QTimer::timeout, this, [this] {
 		if (isVisible())