Skip to content
Snippets Groups Projects
Commit 70f584e6 authored by Ludwig Jaeck's avatar Ludwig Jaeck
Browse files

clang-format

parent e288bad2
No related branches found
No related tags found
1 merge request!1102GUI: Reintroduced stylesheets with dark/light theme
......@@ -167,21 +167,25 @@ void ApplicationSettings::loadStyle(ApplicationSettings::Style style)
m_styleSheetPalette.text = Qt::black;
m_styleSheetPalette.headlineText = QColor(48, 113, 145);
m_styleSheetPalette.headlineBackground = QColor(222, 232, 237);
m_styleSheetPalette.windowBackground = QColor(255,255,255);
m_styleSheetPalette.windowBackgroundAlterantive = m_styleSheetPalette.windowBackground .darker(105);
m_styleSheetPalette.windowBackgroundDarker = m_styleSheetPalette.windowBackground.darker(120);
m_styleSheetPalette.windowBackground = QColor(255, 255, 255);
m_styleSheetPalette.windowBackgroundAlterantive =
m_styleSheetPalette.windowBackground.darker(105);
m_styleSheetPalette.windowBackgroundDarker =
m_styleSheetPalette.windowBackground.darker(120);
m_styleSheetPalette.componentBorder = m_styleSheetPalette.windowBackground.darker(110);
m_styleSheetPalette.componentBackground = Qt::white;
m_styleSheetPalette.buttonBackground = m_styleSheetPalette.windowBackgroundAlterantive;
break;
}
case ApplicationSettings::Style::dark: {
m_styleSheetPalette.text = QColor(213,220,223);
m_styleSheetPalette.text = QColor(213, 220, 223);
m_styleSheetPalette.headlineText = QColor(213, 220, 223);
m_styleSheetPalette.headlineBackground = QColor(29, 39, 44);
m_styleSheetPalette.windowBackground = QColor(43,50,54);
m_styleSheetPalette.windowBackgroundAlterantive = m_styleSheetPalette.windowBackground.lighter(150);
m_styleSheetPalette.windowBackgroundDarker = m_styleSheetPalette.windowBackground.darker(120);
m_styleSheetPalette.windowBackground = QColor(43, 50, 54);
m_styleSheetPalette.windowBackgroundAlterantive =
m_styleSheetPalette.windowBackground.lighter(150);
m_styleSheetPalette.windowBackgroundDarker =
m_styleSheetPalette.windowBackground.darker(120);
m_styleSheetPalette.componentBorder = m_styleSheetPalette.windowBackground.lighter(180);
m_styleSheetPalette.componentBackground = Qt::black;
m_styleSheetPalette.buttonBackground = m_styleSheetPalette.windowBackground.lighter(120);
......@@ -193,14 +197,15 @@ void ApplicationSettings::loadStyle(ApplicationSettings::Style style)
break;
}
}
stylesheet.replace("@text",m_styleSheetPalette.text.name());
stylesheet.replace("@windowBackgroundAlternative",m_styleSheetPalette.windowBackgroundAlterantive.name());
stylesheet.replace("@windowBackgroundDarker",m_styleSheetPalette.windowBackgroundDarker.name());
stylesheet.replace("@windowBackground",m_styleSheetPalette.windowBackground.name());
stylesheet.replace("@componentBoder",m_styleSheetPalette.componentBorder.name());
stylesheet.replace("@componentBackground",m_styleSheetPalette.componentBackground.name());
stylesheet.replace("@text", m_styleSheetPalette.text.name());
stylesheet.replace("@windowBackgroundAlternative",
m_styleSheetPalette.windowBackgroundAlterantive.name());
stylesheet.replace("@windowBackgroundDarker",
m_styleSheetPalette.windowBackgroundDarker.name());
stylesheet.replace("@windowBackground", m_styleSheetPalette.windowBackground.name());
stylesheet.replace("@componentBoder", m_styleSheetPalette.componentBorder.name());
stylesheet.replace("@componentBackground", m_styleSheetPalette.componentBackground.name());
qApp->setStyleSheet(stylesheet);
}
ApplicationSettings::Style ApplicationSettings::currentStyle()
......
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