diff src/gui/dialog/information.cpp @ 36:2743011a6042

*: mass update formatted all source files, converted ALL instances of setStyleSheet() to palettes and fonts (stylesheets suck), and I changed the clang-format file because it wasn't working on my laptop for some reason.
author Paper <mrpapersonic@gmail.com>
date Thu, 21 Sep 2023 15:17:47 -0400
parents cde8f67a7c7d
children d0adc4aedfc8
line wrap: on
line diff
--- a/src/gui/dialog/information.cpp	Thu Sep 21 11:43:24 2023 -0400
+++ b/src/gui/dialog/information.cpp	Thu Sep 21 15:17:47 2023 -0400
@@ -17,8 +17,12 @@
 	setFixedSize(842, 613);
 	setWindowTitle(tr("Anime Information"));
 	setWindowFlags(Qt::Dialog | Qt::CustomizeWindowHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint);
-	setObjectName("infodiag");
-	setStyleSheet(UiUtils::IsInDarkMode() ? "" : "QDialog#infodiag{background-color: white;}");
+
+	{
+		QPalette pal;
+		pal.setColor(QPalette::Window, Qt::white);
+		setPalette(pal);
+	}
 
 	QWidget* widget = new QWidget(this);
 
@@ -28,7 +32,13 @@
 
 	/* main widget */
 	QWidget* main_widget = new QWidget(widget);
-	main_widget->setStyleSheet(UiUtils::IsInDarkMode() ? "" : "background-color: white");
+
+	{
+		QPalette pal;
+		pal.setColor(QPalette::Window, Qt::white);
+		main_widget->setPalette(pal);
+	}
+
 	main_widget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
 
 	/* anime title header text */
@@ -41,7 +51,18 @@
 	anime_title->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Maximum);
 	anime_title->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
 	anime_title->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
-	anime_title->setStyleSheet("font-size: 16px; color: blue; background: transparent;");
+
+	{
+		QFont font(anime_title->font());
+		font.setPointSize(12);
+		anime_title->setFont(font);
+	}
+
+	{
+		QPalette pal;
+		pal.setColor(QPalette::Window, QColor(255, 255, 255, 0));
+		pal.setColor(QPalette::WindowText, Qt::blue);
+	}
 
 	/* tabbed widget */
 	QTabWidget* tabbed_widget = new QTabWidget(main_widget);