Mercurial > minori
comparison src/gui/dialog/information.cc @ 368:6d37a998cf91
gui/dialog: consolidate win32 dark theme cruft into a single class
author | Paper <paper@tflc.us> |
---|---|
date | Fri, 25 Jul 2025 10:05:23 -0400 |
parents | 6b0768158dcd |
children | ea3a74ed2ef9 |
comparison
equal
deleted
inserted
replaced
367:8d45d892be88 | 368:6d37a998cf91 |
---|---|
45 anime->SetUserDateCompleted(_completed); | 45 anime->SetUserDateCompleted(_completed); |
46 } | 46 } |
47 | 47 |
48 InformationDialog::InformationDialog(Anime::Anime* anime, std::function<void(Anime::Anime*)> accept, enum Pages page, | 48 InformationDialog::InformationDialog(Anime::Anime* anime, std::function<void(Anime::Anime*)> accept, enum Pages page, |
49 QWidget* parent) | 49 QWidget* parent) |
50 : QDialog(parent) { | 50 : Dialog(parent) { |
51 /* ack. lots of brackets here, but MUCH, MUCH MUCH better than what it used to be */ | 51 /* ack. lots of brackets here, but MUCH, MUCH MUCH better than what it used to be */ |
52 setFixedSize(842, 613); | 52 setFixedSize(842, 613); |
53 setWindowTitle(tr("Anime Information")); | 53 setWindowTitle(tr("Anime Information")); |
54 setWindowFlags(Qt::Dialog | Qt::CustomizeWindowHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint); | 54 setWindowFlags(Qt::Dialog | Qt::CustomizeWindowHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint); |
55 | 55 |
315 }); | 315 }); |
316 connect(button_box, &QDialogButtonBox::rejected, this, &QDialog::reject); | 316 connect(button_box, &QDialogButtonBox::rejected, this, &QDialog::reject); |
317 full_layout->addWidget(button_box, 0, Qt::AlignBottom); | 317 full_layout->addWidget(button_box, 0, Qt::AlignBottom); |
318 } | 318 } |
319 } | 319 } |
320 | |
321 void InformationDialog::showEvent(QShowEvent* event) { | |
322 QDialog::showEvent(event); | |
323 #ifdef WIN32 | |
324 win32::SetTitleBarsToBlack(session.config.theme.IsInDarkTheme()); | |
325 #endif | |
326 } |