wip: dark/light mode adaptation
This commit is contained in:
parent
0bf8b321ae
commit
13855c2e6f
10 changed files with 125 additions and 14 deletions
|
|
@ -46,14 +46,6 @@ int main (int argc, char* argv[]) {
|
|||
* log_debugcpp(a.toStdString());
|
||||
* }
|
||||
*/
|
||||
|
||||
QApplication::setStyle(new MixerStyle(QStyleFactory::create("Fusion")));
|
||||
//QApplication::setFont(font);
|
||||
QPalette palette = QGuiApplication::palette();
|
||||
//todo: ez full apply os accent colorw
|
||||
palette.setColor(QPalette::Active, QPalette::Highlight, QColor(255, 192, 203, 200));//QColor(30,30,30,100));
|
||||
QGuiApplication::setPalette(palette);
|
||||
|
||||
initialize_file_log();
|
||||
atexit(closeDebugFileLog);
|
||||
|
||||
|
|
@ -64,7 +56,17 @@ int main (int argc, char* argv[]) {
|
|||
startSingleInstanceServer("Mixer");
|
||||
else exit(0);
|
||||
|
||||
|
||||
QApplication::setStyle(new MixerStyle(QStyleFactory::create("Fusion")));
|
||||
//QApplication::setFont(font);
|
||||
//QPalette palette = QGuiApplication::palette();
|
||||
//todo: ez full apply os accent colorw
|
||||
//palette.setColor(QPalette::Active, QPalette::Highlight, QColor(255, 192, 203, 200));
|
||||
//QColor(30,30,30,100));
|
||||
//QGuiApplication::setPalette(palette);
|
||||
osh = new OverseerHandler();
|
||||
osh->populateSystemValues();
|
||||
StylingHelper::setBackgroundColor(osh->isLightMode());
|
||||
//qRegisterMetaType<EndpointWidgetEvent>();
|
||||
|
||||
//INIT CONT
|
||||
|
|
@ -78,6 +80,10 @@ int main (int argc, char* argv[]) {
|
|||
MainWindow window = MainWindow();
|
||||
//window.setSizePolicy(QSizePolicy::Fixed, QSizePolicy::QSizePolicy::MinimumExpanding)
|
||||
QApplication::setQuitOnLastWindowClosed(false);
|
||||
|
||||
DarkModeEventFilter* darkMode = new DarkModeEventFilter();
|
||||
QAbstractEventDispatcher::instance()->installNativeEventFilter(darkMode);
|
||||
|
||||
/*
|
||||
* QFile styleFile(":/assets/style.qss");
|
||||
* styleFile.open(QFile::ReadOnly);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue