Mercurial > minori
comparison src/gui/theme.cc @ 305:91ac90a34003
core/time: remove Duration class, use regular functions instead
this class was pretty useless anyway
| author | Paper <paper@paper.us.eu.org> |
|---|---|
| date | Sun, 19 May 2024 15:56:20 -0400 |
| parents | 9a88e1725fd2 |
| children | c844f8bb87ce |
comparison
equal
deleted
inserted
replaced
| 304:2115488eb302 | 305:91ac90a34003 |
|---|---|
| 91 const QColor darkGray(53, 53, 53); | 91 const QColor darkGray(53, 53, 53); |
| 92 const QColor gray(128, 128, 128); | 92 const QColor gray(128, 128, 128); |
| 93 const QColor black(25, 25, 25); | 93 const QColor black(25, 25, 25); |
| 94 const QColor blue(42, 130, 218); | 94 const QColor blue(42, 130, 218); |
| 95 | 95 |
| 96 QPalette pal(QApplication::style()->standardPalette()); | 96 QPalette pal; |
| 97 | |
| 97 pal.setColor(QPalette::Window, darkGray); | 98 pal.setColor(QPalette::Window, darkGray); |
| 98 pal.setColor(QPalette::WindowText, Qt::white); | 99 pal.setColor(QPalette::WindowText, Qt::white); |
| 99 pal.setColor(QPalette::Base, black); | 100 pal.setColor(QPalette::Base, black); |
| 100 pal.setColor(QPalette::AlternateBase, darkGray); | 101 pal.setColor(QPalette::AlternateBase, darkGray); |
| 101 pal.setColor(QPalette::ToolTipBase, blue); | 102 pal.setColor(QPalette::ToolTipBase, blue); |
| 110 pal.setColor(QPalette::Active, QPalette::Button, gray.darker()); | 111 pal.setColor(QPalette::Active, QPalette::Button, gray.darker()); |
| 111 pal.setColor(QPalette::Disabled, QPalette::ButtonText, gray); | 112 pal.setColor(QPalette::Disabled, QPalette::ButtonText, gray); |
| 112 pal.setColor(QPalette::Disabled, QPalette::WindowText, gray); | 113 pal.setColor(QPalette::Disabled, QPalette::WindowText, gray); |
| 113 pal.setColor(QPalette::Disabled, QPalette::Text, gray); | 114 pal.setColor(QPalette::Disabled, QPalette::Text, gray); |
| 114 pal.setColor(QPalette::Disabled, QPalette::Light, darkGray); | 115 pal.setColor(QPalette::Disabled, QPalette::Light, darkGray); |
| 116 | |
| 115 qApp->setPalette(pal); | 117 qApp->setPalette(pal); |
| 116 | 118 |
| 117 #ifdef WIN32 | 119 #ifdef WIN32 |
| 118 qApp->setStyleSheet([] { | 120 qApp->setStyleSheet([] { |
| 119 QFile f(":/dark.qss"); | 121 QFile f(":/dark.qss"); |
| 125 }()); | 127 }()); |
| 126 #endif | 128 #endif |
| 127 break; | 129 break; |
| 128 } | 130 } |
| 129 default: | 131 default: |
| 130 /* this sucks. */ | 132 /* this sucks */ |
| 131 QPalette pal(QApplication::style()->standardPalette()); | 133 QPalette pal(QApplication::style()->standardPalette()); |
| 132 #ifdef WIN32 /* fuck you Qt 6 */ | 134 #ifdef WIN32 /* fuck you Qt 6 */ |
| 133 pal.setColor(QPalette::Window, QColor(0xF0, 0xF0, 0xF0)); | 135 pal.setColor(QPalette::Window, QColor(0xF0, 0xF0, 0xF0)); |
| 134 #endif | 136 #endif |
| 135 qApp->setPalette(pal); | 137 qApp->setPalette(pal); |
