diff src/gui/pages/statistics.cpp @ 46:d0adc4aedfc8

*: update... this commit: 1. consolidates dark theme stuff to dark_theme.cpp 2. creates a new widgets folder to store all of our custom widgets 3. creates the list settings page in the information dialog, although much of it is nonfunctional: it doesn't save, and the status doesn't even get filled in... we'll fix this later!
author Paper <mrpapersonic@gmail.com>
date Sat, 23 Sep 2023 01:02:15 -0400
parents 9ae9365dd4ea
children d8eb763e6661
line wrap: on
line diff
--- a/src/gui/pages/statistics.cpp	Fri Sep 22 15:21:55 2023 -0400
+++ b/src/gui/pages/statistics.cpp	Sat Sep 23 01:02:15 2023 -0400
@@ -2,7 +2,7 @@
 #include "core/anime_db.h"
 #include "core/session.h"
 #include "gui/pages/anime_list.h"
-#include "gui/ui_utils.h"
+#include "gui/widgets/text.h"
 #include <QString>
 #include <QTextDocument>
 #include <QTextStream>
@@ -18,17 +18,18 @@
 	setFrameShadow(QFrame::Sunken);
 
 	QPalette pal = QPalette();
-	setAutoFillBackground(true);
+	pal.setColor(QPalette::Window, Qt::white);
 	setPalette(pal);
+	setAutoFillBackground(true);
 
-	UiUtils::LabelledTextParagraph* anime_list_paragraph = new UiUtils::LabelledTextParagraph(
+	TextWidgets::LabelledTextParagraph* anime_list_paragraph = new TextWidgets::LabelledTextParagraph(
 	    "Anime list",
 	    "Anime count:\nEpisode count:\nTime spent watching:\nTime to complete:\nAverage score:\nScore deviation:", "\n\n\n\n\n",
 	    this);
 	anime_list_data = anime_list_paragraph->GetParagraph();
 
-	UiUtils::LabelledTextParagraph* application_paragraph =
-	    new UiUtils::LabelledTextParagraph("Minori", "Uptime:", "", this);
+	TextWidgets::LabelledTextParagraph* application_paragraph =
+	    new TextWidgets::LabelledTextParagraph("Minori", "Uptime:", "", this);
 	application_data = application_paragraph->GetParagraph();
 
 	layout()->addWidget(anime_list_paragraph);
@@ -101,11 +102,11 @@
 	ts << MinutesToDateString(Anime::db.GetTotalPlannedAmount()).c_str() << '\n';
 	ts << Anime::db.GetAverageScore() << '\n';
 	ts << Anime::db.GetScoreDeviation();
-	UiUtils::SetPlainTextEditData(anime_list_data, string);
+	TextWidgets::SetPlainTextEditData(anime_list_data, string);
 
 	/* Application */
 	// UiUtils::SetPlainTextEditData(application_data, QString::number(session.uptime() / 1000));
-	UiUtils::SetPlainTextEditData(application_data, QString(SecondsToDateString(session.uptime() / 1000).c_str()));
+	TextWidgets::SetPlainTextEditData(application_data, QString(SecondsToDateString(session.uptime() / 1000).c_str()));
 }
 
 #include "gui/pages/moc_statistics.cpp"