Mercurial > minori
comparison src/gui/dialog/settings.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 | 2743011a6042 |
children | 4c6dd5999b39 |
comparison
equal
deleted
inserted
replaced
45:4b05bc7668eb | 46:d0adc4aedfc8 |
---|---|
1 #include "gui/dialog/settings.h" | 1 #include "gui/dialog/settings.h" |
2 #include "gui/sidebar.h" | 2 #include "gui/widgets/sidebar.h" |
3 #include "gui/ui_utils.h" | 3 #include "gui/widgets/text.h" |
4 #include <QComboBox> | 4 #include <QComboBox> |
5 #include <QDialogButtonBox> | 5 #include <QDialogButtonBox> |
6 #include <QGroupBox> | 6 #include <QGroupBox> |
7 #include <QHBoxLayout> | 7 #include <QHBoxLayout> |
8 #include <QPlainTextDocumentLayout> | 8 #include <QPlainTextDocumentLayout> |
21 QFont font(page_title->font()); | 21 QFont font(page_title->font()); |
22 font.setPointSize(10); | 22 font.setPointSize(10); |
23 font.setWeight(QFont::Bold); | 23 font.setWeight(QFont::Bold); |
24 page_title->setFont(font); | 24 page_title->setFont(font); |
25 | 25 |
26 QPalette pal; | 26 QPalette pal = page_title->palette(); |
27 pal.setColor(QPalette::WindowText, QColor(0xAB, 0xAB, 0xAB)); | 27 pal.setColor(QPalette::Window, QColor(0xAB, 0xAB, 0xAB)); |
28 pal.setColor(QPalette::Window, Qt::white); | 28 pal.setColor(QPalette::WindowText, Qt::white); |
29 page_title->setPalette(pal); | 29 page_title->setPalette(pal); |
30 page_title->setAutoFillBackground(true); | |
30 | 31 |
31 page_title->setFixedHeight(23); | 32 page_title->setFixedHeight(23); |
32 page_title->setAlignment(Qt::AlignVCenter | Qt::AlignLeft); | 33 page_title->setAlignment(Qt::AlignVCenter | Qt::AlignLeft); |
33 page_title->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); | 34 page_title->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); |
35 | |
34 tab_widget = new QTabWidget(this); | 36 tab_widget = new QTabWidget(this); |
35 tab_widget->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Expanding); | 37 tab_widget->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Expanding); |
36 | 38 |
37 QVBoxLayout* layout = new QVBoxLayout; | 39 QVBoxLayout* layout = new QVBoxLayout; |
38 layout->setMargin(0); | 40 layout->setMargin(0); |