diff src/gui/dialog/settings.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/settings.cpp	Thu Sep 21 11:43:24 2023 -0400
+++ b/src/gui/dialog/settings.cpp	Thu Sep 21 15:17:47 2023 -0400
@@ -17,8 +17,17 @@
 	page_title->setWordWrap(false);
 	page_title->setFrameShape(QFrame::Panel);
 	page_title->setFrameShadow(QFrame::Sunken);
-	page_title->setStyleSheet(
-	    "QLabel { font-size: 10pt; font-weight: bold; background-color: #ABABAB; color: white; }");
+
+	QFont font(page_title->font());
+	font.setPointSize(10);
+	font.setWeight(QFont::Bold);
+	page_title->setFont(font);
+
+	QPalette pal;
+	pal.setColor(QPalette::WindowText, QColor(0xAB, 0xAB, 0xAB));
+	pal.setColor(QPalette::Window, Qt::white);
+	page_title->setPalette(pal);
+
 	page_title->setFixedHeight(23);
 	page_title->setAlignment(Qt::AlignVCenter | Qt::AlignLeft);
 	page_title->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
@@ -68,7 +77,15 @@
 	// sidebar->AddItem(tr("Advanced"), SideBar::CreateIcon(":/icons/24x24/gear.png"));
 	sidebar->setIconSize(QSize(24, 24));
 	sidebar->setFrameShape(QFrame::Box);
-	sidebar->setStyleSheet("QListWidget { background-color: white; font-size: 12px; }");
+
+	QFont font(sidebar->font());
+	font.setPointSize(9);
+	sidebar->setFont(font);
+
+	QPalette pal;
+	pal.setColor(QPalette::Window, Qt::white);
+	sidebar->setPalette(pal);
+
 	sidebar->setFixedWidth(158);
 	sidebar->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding);