comparison 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
comparison
equal deleted inserted replaced
35:329b7921a6be 36:2743011a6042
15 setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Expanding); 15 setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Expanding);
16 page_title = new QLabel(title, this); 16 page_title = new QLabel(title, this);
17 page_title->setWordWrap(false); 17 page_title->setWordWrap(false);
18 page_title->setFrameShape(QFrame::Panel); 18 page_title->setFrameShape(QFrame::Panel);
19 page_title->setFrameShadow(QFrame::Sunken); 19 page_title->setFrameShadow(QFrame::Sunken);
20 page_title->setStyleSheet( 20
21 "QLabel { font-size: 10pt; font-weight: bold; background-color: #ABABAB; color: white; }"); 21 QFont font(page_title->font());
22 font.setPointSize(10);
23 font.setWeight(QFont::Bold);
24 page_title->setFont(font);
25
26 QPalette pal;
27 pal.setColor(QPalette::WindowText, QColor(0xAB, 0xAB, 0xAB));
28 pal.setColor(QPalette::Window, Qt::white);
29 page_title->setPalette(pal);
30
22 page_title->setFixedHeight(23); 31 page_title->setFixedHeight(23);
23 page_title->setAlignment(Qt::AlignVCenter | Qt::AlignLeft); 32 page_title->setAlignment(Qt::AlignVCenter | Qt::AlignLeft);
24 page_title->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); 33 page_title->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
25 tab_widget = new QTabWidget(this); 34 tab_widget = new QTabWidget(this);
26 tab_widget->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Expanding); 35 tab_widget->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Expanding);
66 // sidebar->AddItem(tr("Sharing"), SideBar::CreateIcon(":/icons/24x24/megaphone.png")); 75 // sidebar->AddItem(tr("Sharing"), SideBar::CreateIcon(":/icons/24x24/megaphone.png"));
67 // sidebar->AddItem(tr("Torrents"), SideBar::CreateIcon(":/icons/24x24/feed.png")); 76 // sidebar->AddItem(tr("Torrents"), SideBar::CreateIcon(":/icons/24x24/feed.png"));
68 // sidebar->AddItem(tr("Advanced"), SideBar::CreateIcon(":/icons/24x24/gear.png")); 77 // sidebar->AddItem(tr("Advanced"), SideBar::CreateIcon(":/icons/24x24/gear.png"));
69 sidebar->setIconSize(QSize(24, 24)); 78 sidebar->setIconSize(QSize(24, 24));
70 sidebar->setFrameShape(QFrame::Box); 79 sidebar->setFrameShape(QFrame::Box);
71 sidebar->setStyleSheet("QListWidget { background-color: white; font-size: 12px; }"); 80
81 QFont font(sidebar->font());
82 font.setPointSize(9);
83 sidebar->setFont(font);
84
85 QPalette pal;
86 pal.setColor(QPalette::Window, Qt::white);
87 sidebar->setPalette(pal);
88
72 sidebar->setFixedWidth(158); 89 sidebar->setFixedWidth(158);
73 sidebar->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding); 90 sidebar->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding);
74 91
75 QStackedWidget* stacked = new QStackedWidget; 92 QStackedWidget* stacked = new QStackedWidget;
76 stacked->addWidget(new SettingsPageServices(stacked)); 93 stacked->addWidget(new SettingsPageServices(stacked));