Mercurial > minori
comparison src/gui/window.cc @ 105:6d8da6e64d61
theme: add dark stylesheet, make it actually usable
win32: make the titlebar black where available
| author | Paper <mrpapersonic@gmail.com> | 
|---|---|
| date | Sun, 05 Nov 2023 03:54:26 -0500 | 
| parents | 621084cc542c | 
| children | c8c72278f6fd | 
   comparison
  equal
  deleted
  inserted
  replaced
| 104:27455104ea37 | 105:6d8da6e64d61 | 
|---|---|
| 270 | 270 | 
| 271 void MainWindow::SetActivePage(QWidget* page) { | 271 void MainWindow::SetActivePage(QWidget* page) { | 
| 272 this->setCentralWidget(page); | 272 this->setCentralWidget(page); | 
| 273 } | 273 } | 
| 274 | 274 | 
| 275 void MainWindow::showEvent(QShowEvent* event) { | |
| 276 QMainWindow::showEvent(event); | |
| 277 #ifdef WIN32 | |
| 278 win32::SetTitleBarToBlack(this, session.config.theme.IsInDarkMode()); | |
| 279 #endif | |
| 280 } | |
| 281 | |
| 275 void MainWindow::closeEvent(QCloseEvent* event) { | 282 void MainWindow::closeEvent(QCloseEvent* event) { | 
| 276 session.config.Save(); | 283 session.config.Save(); | 
| 277 event->accept(); | 284 event->accept(); | 
| 278 } | 285 } | 
| 279 | 286 | 
