diff src/gui/pages/statistics.cc @ 94:2f373d48f889

*: etc changes to graph stuff
author Paper <mrpapersonic@gmail.com>
date Wed, 01 Nov 2023 14:30:26 -0400
parents d5efb81540b3
children b315f3759c56
line wrap: on
line diff
--- a/src/gui/pages/statistics.cc	Wed Nov 01 13:52:34 2023 -0400
+++ b/src/gui/pages/statistics.cc	Wed Nov 01 14:30:26 2023 -0400
@@ -28,13 +28,16 @@
 	    tr("Anime count:\nEpisode count:\nTime spent watching:\nTime to complete:\nAverage score:\nScore deviation:"),
 	    "", this));
 
-	/* spaghetti incoming */
 	QWidget* score_dist_widget = new QWidget(this);
 	QVBoxLayout* score_dist_layout = new QVBoxLayout(score_dist_widget);
 
+	score_dist_layout->addWidget(new TextWidgets::Header(tr("Score distribution"), score_dist_widget));
+
+	/* I have to explain myself here: I hate this :). This makes a widget as a layer to create a margin,
+	   similar to what I do in text.cc with sections. I hate it and it should really be put into a separate
+	   class, but whatever. */
 	QWidget* content = new QWidget(score_dist_widget);
 	QVBoxLayout* content_layout = new QVBoxLayout(content);
-	score_dist_layout->addWidget(new TextWidgets::Header(tr("Score distribution"), content));
 	_score_distribution_graph.reset(new Graph<int>(content));
 	content_layout->addWidget(_score_distribution_graph.get());
 	content_layout->setContentsMargins(0, 0, 0, 0);