Skip to content
Snippets Groups Projects
Commit dc10d39d authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

+comms

parent 39a3878a
No related branches found
No related tags found
1 merge request!2452cleanup autosave, style sheet & palette; split save some files; dissolve GUI/Support
...@@ -19,17 +19,19 @@ ...@@ -19,17 +19,19 @@
void GUI::Style::setInitialStyle() void GUI::Style::setInitialStyle()
{ {
// The palette is used by the style sheet, but cannot be set there.
// Therefore it is hard-coded here:
QPalette p = QGuiApplication::palette();
p.setColor(QPalette::Text, Qt::black);
p.setColor(QPalette::WindowText, Qt::black);
p.setColor(QPalette::Base, Qt::white);
p.setColor(QPalette::AlternateBase, QColor(255, 255, 255).darker(105));
p.setColor(QPalette::Dark, QColor(255, 255, 255).darker(110));
p.setColor(QPalette::ToolTipBase, QColor(174, 248, 255));
QApplication::setPalette(p);
QFile base(":/styles/Base.stylesheet"); QFile base(":/styles/Base.stylesheet");
base.open(QFile::ReadOnly); base.open(QFile::ReadOnly);
QString stylesheet = base.readAll(); QString stylesheet = base.readAll();
qApp->setStyleSheet(stylesheet); qApp->setStyleSheet(stylesheet);
QPalette styleSheetPalette = QGuiApplication::palette();
styleSheetPalette.setColor(QPalette::Text, Qt::black);
styleSheetPalette.setColor(QPalette::WindowText, Qt::black);
styleSheetPalette.setColor(QPalette::Base, Qt::white);
styleSheetPalette.setColor(QPalette::AlternateBase, QColor(255, 255, 255).darker(105));
styleSheetPalette.setColor(QPalette::Dark, QColor(255, 255, 255).darker(110));
styleSheetPalette.setColor(QPalette::ToolTipBase, QColor(174, 248, 255));
QApplication::setPalette(styleSheetPalette);
} }
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
namespace GUI::Style { namespace GUI::Style {
//! Sets the color palette, and loads the style sheet.
void setInitialStyle(); void setInitialStyle();
} // namespace GUI::Style } // namespace GUI::Style
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment