24.09., 9:00 - 11:00: Due to updates GitLab will be unavailable for some minutes between 09:00 and 11:00.

Commit 69d7ea4d authored by Jakob Weiss's avatar Jakob Weiss

Changed Default Qt Style to a dark fusion

Colors adapted from https://gist.github.com/QuantumCD/6245215, might need some more work to display all widgets nicely
parent 24cb7144
...@@ -53,6 +53,7 @@ ...@@ -53,6 +53,7 @@
#include <QApplication> #include <QApplication>
#include <QThread> #include <QThread>
#include <QStyleFactory>
#ifdef CAMPVIS_HAS_SCRIPTING #ifdef CAMPVIS_HAS_SCRIPTING
#include "scripting/glue/luavmstate.h" #include "scripting/glue/luavmstate.h"
...@@ -171,6 +172,27 @@ namespace campvis { ...@@ -171,6 +172,27 @@ namespace campvis {
} }
} }
// Set Qt color palette to dark - adapted from https://gist.github.com/QuantumCD/6245215
QApplication::setStyle(QStyleFactory::create("Fusion"));
QPalette darkPalette;
darkPalette.setColor(QPalette::Window, QColor(53, 53, 53));
darkPalette.setColor(QPalette::WindowText, Qt::white);
darkPalette.setColor(QPalette::Base, QColor(25, 25, 25));
darkPalette.setColor(QPalette::AlternateBase, QColor(53, 53, 53));
darkPalette.setColor(QPalette::ToolTipBase, Qt::white);
darkPalette.setColor(QPalette::ToolTipText, Qt::white);
darkPalette.setColor(QPalette::Text, Qt::white);
darkPalette.setColor(QPalette::Button, QColor(53, 53, 53));
darkPalette.setColor(QPalette::ButtonText, Qt::white);
darkPalette.setColor(QPalette::BrightText, Qt::red);
darkPalette.setColor(QPalette::Link, QColor(42, 130, 218));
darkPalette.setColor(QPalette::Highlight, QColor(42, 130, 218));
darkPalette.setColor(QPalette::HighlightedText, Qt::black);
setPalette(darkPalette);
setStyleSheet("QToolTip { color: #ffffff; background-color: #2a82da; border: 1px solid white; }");
_initialized = true; _initialized = true;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment