Mercurial > minori
diff src/gui/dialog/information.cpp @ 69:27a19dd6cba1
*: fix up some stuff
settings: due to my own incompetence OnOK caused the entire program to crash,
now that's fixed :)
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Tue, 03 Oct 2023 03:38:25 -0400 |
parents | 2417121d894e |
children | 3364fadc8a36 |
line wrap: on
line diff
--- a/src/gui/dialog/information.cpp Mon Oct 02 21:33:25 2023 -0400 +++ b/src/gui/dialog/information.cpp Tue Oct 03 03:38:25 2023 -0400 @@ -18,6 +18,7 @@ #include <QLineEdit> #include <QPlainTextEdit> #include <QSpinBox> +#include <QLabel> #include <QStringList> #include <QTextStream> #include <QVBoxLayout> @@ -43,8 +44,8 @@ setWindowFlags(Qt::Dialog | Qt::CustomizeWindowHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint); { - QPalette pal; - pal.setColor(QPalette::Window, Qt::white); + QPalette pal(palette()); + pal.setColor(QPalette::Window, pal.color(QPalette::Base)); setPalette(pal); } @@ -61,12 +62,6 @@ /* main widget */ QWidget* main_widget = new QWidget(widget); - { - QPalette pal; - pal.setColor(QPalette::Window, Qt::white); - main_widget->setPalette(pal); - } - main_widget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); id = anime.GetId(); @@ -81,6 +76,12 @@ /* main info tab */ AnimeInfoWidget* main_information_widget = new AnimeInfoWidget(anime, tabbed_widget); + { + QPalette pal(main_information_widget->palette()); + pal.setColor(QPalette::Base, pal.color(QPalette::Window)); + main_information_widget->setPalette(pal); + } + QWidget* settings_widget = new QWidget(tabbed_widget); settings_widget->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum); @@ -105,7 +106,7 @@ subsection_layout->setSpacing(LAYOUT_VERT_SPACING); \ subsection_layout->setContentsMargins(0, 0, 0, 0); \ x; \ - layout->addWidget(subsection); \ + layout->addWidget(subsection, 0, Qt::AlignBottom); \ } /* Creates a section in the parent `a` */