Cleanup themes

This commit is contained in:
Alex Spataru 2021-10-06 16:58:35 -05:00
parent 4779f704bb
commit 7f2a25a3ad
23 changed files with 146 additions and 216 deletions

View File

@ -37,7 +37,7 @@ Widgets.Window {
title: qsTr("View") title: qsTr("View")
headerDoubleClickEnabled: false headerDoubleClickEnabled: false
icon.source: "qrc:/icons/visibility.svg" icon.source: "qrc:/icons/visibility.svg"
backgroundColor: Cpp_ThemeManager.embeddedWindowBackground backgroundColor: Cpp_ThemeManager.paneWindowBackground
// //
// Maps the slider position to points // Maps the slider position to points

View File

@ -38,7 +38,7 @@ Item {
anchors.fill: parent anchors.fill: parent
title: loader.widgetTitle title: loader.widgetTitle
icon.source: loader.widgetIcon icon.source: loader.widgetIcon
borderColor: Cpp_ThemeManager.datasetWindowBorder borderColor: Cpp_ThemeManager.widgetWindowBorder
onHeaderDoubleClicked: externalWindow.visible = true onHeaderDoubleClicked: externalWindow.visible = true
WidgetLoader { WidgetLoader {
@ -58,8 +58,8 @@ Item {
minimumWidth: 640 minimumWidth: 640
minimumHeight: 480 minimumHeight: 480
title: externalLoader.widgetTitle title: externalLoader.widgetTitle
palette.base: Cpp_ThemeManager.datasetWindowBackground palette.base: Cpp_ThemeManager.widgetWindowBackground
palette.window: Cpp_ThemeManager.datasetWindowBackground palette.window: Cpp_ThemeManager.widgetWindowBackground
flags: Qt.Dialog | Qt.WindowCloseButtonHint | Qt.WindowTitleHint flags: Qt.Dialog | Qt.WindowCloseButtonHint | Qt.WindowTitleHint
WidgetLoader { WidgetLoader {

View File

@ -36,7 +36,7 @@ Widgets.Window {
title: qsTr("Data") title: qsTr("Data")
headerDoubleClickEnabled: false headerDoubleClickEnabled: false
icon.source: "qrc:/icons/dataset.svg" icon.source: "qrc:/icons/dataset.svg"
backgroundColor: Cpp_ThemeManager.embeddedWindowBackground backgroundColor: Cpp_ThemeManager.paneWindowBackground
// Hacks for calculating cell width // Hacks for calculating cell width
readonly property int cellHeight: cellWidth * (2/3) readonly property int cellHeight: cellWidth * (2/3)

View File

@ -34,8 +34,8 @@ Widgets.Window {
// //
headerDoubleClickEnabled: false headerDoubleClickEnabled: false
icon.source: "qrc:/icons/dataset.svg" icon.source: "qrc:/icons/dataset.svg"
borderColor: Cpp_ThemeManager.datasetWindowBorder borderColor: Cpp_ThemeManager.widgetWindowBorder
palette.window: Cpp_ThemeManager.datasetWindowBackground palette.window: Cpp_ThemeManager.widgetWindowBackground
title: qsTr("Dataset %1 - %2").arg(dataset + 1).arg(Cpp_JSON_Editor.datasetTitle(group, dataset)) title: qsTr("Dataset %1 - %2").arg(dataset + 1).arg(Cpp_JSON_Editor.datasetTitle(group, dataset))
// //

View File

@ -36,7 +36,7 @@ Widgets.Window {
Layout.minimumHeight: height Layout.minimumHeight: height
headerDoubleClickEnabled: false headerDoubleClickEnabled: false
icon.source: "qrc:/icons/group.svg" icon.source: "qrc:/icons/group.svg"
backgroundColor: Cpp_ThemeManager.embeddedWindowBackground backgroundColor: Cpp_ThemeManager.paneWindowBackground
height: column.implicitHeight + headerHeight + 4 * app.spacing height: column.implicitHeight + headerHeight + 4 * app.spacing
title: qsTr("Group %1 - %2").arg(group + 1).arg(Cpp_JSON_Editor.groupTitle(group)) title: qsTr("Group %1 - %2").arg(group + 1).arg(Cpp_JSON_Editor.groupTitle(group))

View File

@ -122,7 +122,7 @@ Item {
headerDoubleClickEnabled: false headerDoubleClickEnabled: false
icon.source: "qrc:/icons/code.svg" icon.source: "qrc:/icons/code.svg"
anchors.margins: app.spacing * 1.5 anchors.margins: app.spacing * 1.5
backgroundColor: Cpp_ThemeManager.embeddedWindowBackground backgroundColor: Cpp_ThemeManager.paneWindowBackground
// //
// Right-click context menu // Right-click context menu

View File

@ -136,7 +136,7 @@ Item {
headerDoubleClickEnabled: false headerDoubleClickEnabled: false
anchors.margins: app.spacing * 1.5 anchors.margins: app.spacing * 1.5
icon.source: "qrc:/icons/settings.svg" icon.source: "qrc:/icons/settings.svg"
backgroundColor: Cpp_ThemeManager.embeddedWindowBackground backgroundColor: Cpp_ThemeManager.paneWindowBackground
// //
// Control arrangement // Control arrangement
@ -210,7 +210,7 @@ Item {
Layout.alignment: Qt.AlignVCenter Layout.alignment: Qt.AlignVCenter
checked: Cpp_CSV_Export.exportEnabled checked: Cpp_CSV_Export.exportEnabled
Layout.maximumWidth: root.maxItemWidth Layout.maximumWidth: root.maxItemWidth
palette.highlight: Cpp_ThemeManager.csvHighlight palette.highlight: Cpp_ThemeManager.csvCheckbox
onCheckedChanged: { onCheckedChanged: {
if (Cpp_CSV_Export.exportEnabled !== checked) if (Cpp_CSV_Export.exportEnabled !== checked)

View File

@ -43,7 +43,7 @@ Page {
property bool altButtonEnabled: false property bool altButtonEnabled: false
property alias altButtonIcon: altBt.icon property alias altButtonIcon: altBt.icon
property alias headerDoubleClickEnabled: headerMouseArea.enabled property alias headerDoubleClickEnabled: headerMouseArea.enabled
property color backgroundColor: Cpp_ThemeManager.datasetWindowBackground property color backgroundColor: Cpp_ThemeManager.widgetWindowBackground
property color gradientColor1: root.gradient ? Cpp_ThemeManager.windowGradient1 : property color gradientColor1: root.gradient ? Cpp_ThemeManager.windowGradient1 :
root.borderColor root.borderColor
property color gradientColor2: root.gradient ? Cpp_ThemeManager.windowGradient2 : property color gradientColor2: root.gradient ? Cpp_ThemeManager.windowGradient2 :

View File

@ -35,33 +35,28 @@
"windowGradient2":"#323030", "windowGradient2":"#323030",
"alternativeHighlight":"#42b554", "alternativeHighlight":"#42b554",
"setupPanelBackground":"#f2f2f2", "setupPanelBackground":"#f2f2f2",
"datasetValue":"#dd3224", "paneWindowBackground":"#ffffff",
"graphDialBorder":"#222222",
"datasetTextPrimary":"#24476a",
"datasetTextSecondary":"#666666",
"datasetWindowBackground":"#ffffff",
"datasetWindowBorder":"#62676a",
"embeddedWindowBackground":"#ffffff",
"ledEnabled":"#26cd40", "ledEnabled":"#26cd40",
"ledDisabled":"#686868", "ledDisabled":"#686868",
"csvHighlight":"#2e895c", "csvCheckbox":"#2e895c",
"widgetForegroundPrimary":"#f94144",
"widgetForegroundSecondary":"#666666",
"widgetIndicator1":"#444444",
"widgetIndicator2":"#f94144",
"widgetIndicator3":"#90be6d",
"widgetAlternativeBackground":"#fafafa",
"widgetControlBackground":"#666666",
"connectButtonChecked":"#d72d60", "connectButtonChecked":"#d72d60",
"connectButtonUnchecked":"#2eed5c", "connectButtonUnchecked":"#2eed5c",
"widgetTextPrimary":"#24476a",
"widgetTextSecondary":"#666666",
"widgetWindowBackground":"#f2f2f2",
"widgetWindowBorder":"#62676a",
"widgetForegroundPrimary":"#f94144",
"widgetForegroundSecondary":"#666666",
"widgetIndicator":"#444444",
"widgetControlBackground":"#666666",
"widgetColors":[ "widgetColors":[
"#f94144", "#0172bd",
"#f3722c", "#d9531a",
"#f8961e", "#ecb120",
"#f9844a", "#7d2f8e",
"#f9c74f", "#77ab30",
"#90be6d", "#4dbeee",
"#43aa8b", "#a21330",
"#4d908e", "#4d908e",
"#577590", "#577590",
"#277da1" "#277da1"

View File

@ -35,33 +35,28 @@
"windowGradient2":"#058ca7", "windowGradient2":"#058ca7",
"alternativeHighlight":"#d72d60", "alternativeHighlight":"#d72d60",
"setupPanelBackground":"#16232a", "setupPanelBackground":"#16232a",
"datasetValue":"#e6e0b2", "paneWindowBackground":"#121218",
"graphDialBorder":"#eeeeee",
"datasetTextPrimary":"#e6e0b2",
"datasetTextSecondary":"#517497",
"datasetWindowBackground":"#121920",
"datasetWindowBorder":"#517497",
"embeddedWindowBackground":"#121218",
"ledEnabled":"#d72d60", "ledEnabled":"#d72d60",
"ledDisabled":"#2d6073", "ledDisabled":"#2d6073",
"csvHighlight":"#2e895c", "csvCheckbox":"#2e895c",
"widgetForegroundPrimary":"#8ecd9d",
"widgetForegroundSecondary":"#517497",
"widgetIndicator1":"#e6e0b2",
"widgetIndicator2":"#d72d60",
"widgetIndicator3":"#2d6073",
"widgetAlternativeBackground":"#121218",
"widgetControlBackground":"#bebebe", "widgetControlBackground":"#bebebe",
"connectButtonChecked":"#d72d60", "connectButtonChecked":"#d72d60",
"connectButtonUnchecked":"#2eed5c", "connectButtonUnchecked":"#2eed5c",
"widgetTextPrimary":"#e6e0b2",
"widgetTextSecondary":"#517497",
"widgetWindowBackground":"#121920",
"widgetWindowBorder":"#517497",
"widgetForegroundPrimary":"#8ecd9d",
"widgetForegroundSecondary":"#517497",
"widgetIndicator":"#e6e0b2",
"widgetColors":[ "widgetColors":[
"#f94144", "#0172bd",
"#f3722c", "#d9531a",
"#f8961e", "#ecb120",
"#f9844a", "#7d2f8e",
"#f9c74f", "#77ab30",
"#90be6d", "#4dbeee",
"#43aa8b", "#a21330",
"#4d908e", "#4d908e",
"#577590", "#577590",
"#277da1" "#277da1"

View File

@ -35,33 +35,28 @@
"windowGradient2":"#004077", "windowGradient2":"#004077",
"alternativeHighlight":"#53ab27", "alternativeHighlight":"#53ab27",
"setupPanelBackground":"#e8e8e8", "setupPanelBackground":"#e8e8e8",
"datasetValue":"#dd3224", "paneWindowBackground":"#f1f1f1",
"graphDialBorder":"#222222",
"datasetTextPrimary":"#24476a",
"datasetTextSecondary":"#666666",
"datasetWindowBackground":"#e8e8e8",
"datasetWindowBorder":"#336698",
"embeddedWindowBackground":"#f1f1f1",
"ledEnabled":"#0072C3", "ledEnabled":"#0072C3",
"ledDisabled":"#686868", "ledDisabled":"#686868",
"csvHighlight":"#2e895c", "csvCheckbox":"#2e895c",
"widgetForegroundPrimary":"#f94144",
"widgetForegroundSecondary":"#666666",
"widgetIndicator1":"#444444",
"widgetIndicator2":"#f94144",
"widgetIndicator3":"#90be6d",
"widgetAlternativeBackground":"#fafafa",
"widgetControlBackground":"#666666",
"connectButtonChecked":"#fe696e", "connectButtonChecked":"#fe696e",
"connectButtonUnchecked":"#26cd40", "connectButtonUnchecked":"#26cd40",
"widgetTextPrimary":"#24476a",
"widgetTextSecondary":"#666666",
"widgetWindowBackground":"#e8e8e8",
"widgetWindowBorder":"#336698",
"widgetForegroundPrimary":"#f94144",
"widgetForegroundSecondary":"#666666",
"widgetIndicator":"#444444",
"widgetControlBackground":"#666666",
"widgetColors":[ "widgetColors":[
"#f94144", "#0172bd",
"#f3722c", "#d9531a",
"#f8961e", "#ecb120",
"#f9844a", "#7d2f8e",
"#f9c74f", "#77ab30",
"#90be6d", "#4dbeee",
"#43aa8b", "#a21330",
"#4d908e", "#4d908e",
"#577590", "#577590",
"#277da1" "#277da1"

View File

@ -1,7 +1,7 @@
<RCC> <RCC>
<qresource prefix="/themes"> <qresource prefix="/themes">
<file>1_Light.json</file> <file>2_MathWorks.json</file>
<file>0_Dark.json</file> <file>1_Classic.json</file>
<file>2_Noir.json</file> <file>0_Noir.json</file>
</qresource> </qresource>
</RCC> </RCC>

View File

@ -171,22 +171,17 @@ void ThemeManager::loadTheme(const int id)
m_dialogBackground = QColor(colors.value("dialogBackground").toString()); m_dialogBackground = QColor(colors.value("dialogBackground").toString());
m_alternativeHighlight = QColor(colors.value("alternativeHighlight").toString()); m_alternativeHighlight = QColor(colors.value("alternativeHighlight").toString());
m_setupPanelBackground = QColor(colors.value("setupPanelBackground").toString()); m_setupPanelBackground = QColor(colors.value("setupPanelBackground").toString());
m_datasetValue = QColor(colors.value("datasetValue").toString()); m_widgetTextPrimary = QColor(colors.value("widgetTextPrimary").toString());
m_graphDialBorder = QColor(colors.value("graphDialBorder").toString()); m_widgetTextSecondary = QColor(colors.value("widgetTextSecondary").toString());
m_datasetTextPrimary = QColor(colors.value("datasetTextPrimary").toString()); m_widgetWindowBackground = QColor(colors.value("widgetWindowBackground").toString());
m_datasetTextSecondary = QColor(colors.value("datasetTextSecondary").toString()); m_widgetWindowBorder = QColor(colors.value("widgetWindowBorder").toString());
m_datasetWindowBackground = QColor(colors.value("datasetWindowBackground").toString()); m_paneWindowBackground = QColor(colors.value("paneWindowBackground").toString());
m_datasetWindowBorder = QColor(colors.value("datasetWindowBorder").toString());
m_embeddedWindowBackground = QColor(colors.value("embeddedWindowBackground").toString());
m_ledEnabled = QColor(colors.value("ledEnabled").toString()); m_ledEnabled = QColor(colors.value("ledEnabled").toString());
m_ledDisabled = QColor(colors.value("ledDisabled").toString()); m_ledDisabled = QColor(colors.value("ledDisabled").toString());
m_csvHighlight = QColor(colors.value("csvHighlight").toString()); m_csvCheckbox = QColor(colors.value("csvCheckbox").toString());
m_widgetForegroundPrimary = QColor(colors.value("widgetForegroundPrimary").toString()); m_widgetForegroundPrimary = QColor(colors.value("widgetForegroundPrimary").toString());
m_widgetForegroundSecondary = QColor(colors.value("widgetForegroundSecondary").toString()); m_widgetForegroundSecondary = QColor(colors.value("widgetForegroundSecondary").toString());
m_widgetIndicator1 = QColor(colors.value("widgetIndicator1").toString()); m_widgetIndicator = QColor(colors.value("widgetIndicator").toString());
m_widgetIndicator2 = QColor(colors.value("widgetIndicator2").toString());
m_widgetIndicator3 = QColor(colors.value("widgetIndicator3").toString());
m_widgetAlternativeBackground = QColor(colors.value("widgetAlternativeBackground").toString());
m_widgetControlBackground = QColor(colors.value("widgetControlBackground").toString()); m_widgetControlBackground = QColor(colors.value("widgetControlBackground").toString());
m_connectButtonChecked = QColor(colors.value("connectButtonChecked").toString()); m_connectButtonChecked = QColor(colors.value("connectButtonChecked").toString());
m_connectButtonUnchecked = QColor(colors.value("connectButtonUnchecked").toString()); m_connectButtonUnchecked = QColor(colors.value("connectButtonUnchecked").toString());
@ -429,39 +424,29 @@ QColor ThemeManager::setupPanelBackground() const
return m_setupPanelBackground; return m_setupPanelBackground;
} }
QColor ThemeManager::datasetValue() const QColor ThemeManager::widgetTextPrimary() const
{ {
return m_datasetValue; return m_widgetTextPrimary;
} }
QColor ThemeManager::graphDialBorder() const QColor ThemeManager::widgetTextSecondary() const
{ {
return m_graphDialBorder; return m_widgetTextSecondary;
} }
QColor ThemeManager::datasetTextPrimary() const QColor ThemeManager::widgetWindowBackground() const
{ {
return m_datasetTextPrimary; return m_widgetWindowBackground;
} }
QColor ThemeManager::datasetTextSecondary() const QColor ThemeManager::widgetWindowBorder() const
{ {
return m_datasetTextSecondary; return m_widgetWindowBorder;
} }
QColor ThemeManager::datasetWindowBackground() const QColor ThemeManager::paneWindowBackground() const
{ {
return m_datasetWindowBackground; return m_paneWindowBackground;
}
QColor ThemeManager::datasetWindowBorder() const
{
return m_datasetWindowBorder;
}
QColor ThemeManager::embeddedWindowBackground() const
{
return m_embeddedWindowBackground;
} }
QColor ThemeManager::ledEnabled() const QColor ThemeManager::ledEnabled() const
@ -474,9 +459,9 @@ QColor ThemeManager::ledDisabled() const
return m_ledDisabled; return m_ledDisabled;
} }
QColor ThemeManager::csvHighlight() const QColor ThemeManager::csvCheckbox() const
{ {
return m_csvHighlight; return m_csvCheckbox;
} }
QColor ThemeManager::widgetForegroundPrimary() const QColor ThemeManager::widgetForegroundPrimary() const
@ -489,24 +474,9 @@ QColor ThemeManager::widgetForegroundSecondary() const
return m_widgetForegroundSecondary; return m_widgetForegroundSecondary;
} }
QColor ThemeManager::widgetIndicator1() const QColor ThemeManager::widgetIndicator() const
{ {
return m_widgetIndicator1; return m_widgetIndicator;
}
QColor ThemeManager::widgetIndicator2() const
{
return m_widgetIndicator2;
}
QColor ThemeManager::widgetIndicator3() const
{
return m_widgetIndicator3;
}
QColor ThemeManager::widgetAlternativeBackground() const
{
return m_widgetAlternativeBackground;
} }
QColor ThemeManager::widgetControlBackground() const QColor ThemeManager::widgetControlBackground() const

View File

@ -135,26 +135,20 @@ class ThemeManager : public QObject
Q_PROPERTY(QColor setupPanelBackground Q_PROPERTY(QColor setupPanelBackground
READ setupPanelBackground READ setupPanelBackground
NOTIFY themeChanged) NOTIFY themeChanged)
Q_PROPERTY(QColor datasetValue Q_PROPERTY(QColor widgetTextPrimary
READ datasetValue READ widgetTextPrimary
NOTIFY themeChanged) NOTIFY themeChanged)
Q_PROPERTY(QColor graphDialBorder Q_PROPERTY(QColor widgetTextSecondary
READ graphDialBorder READ widgetTextSecondary
NOTIFY themeChanged) NOTIFY themeChanged)
Q_PROPERTY(QColor datasetTextPrimary Q_PROPERTY(QColor widgetWindowBackground
READ datasetTextPrimary READ widgetWindowBackground
NOTIFY themeChanged) NOTIFY themeChanged)
Q_PROPERTY(QColor datasetTextSecondary Q_PROPERTY(QColor widgetWindowBorder
READ datasetTextSecondary READ widgetWindowBorder
NOTIFY themeChanged) NOTIFY themeChanged)
Q_PROPERTY(QColor datasetWindowBackground Q_PROPERTY(QColor paneWindowBackground
READ datasetWindowBackground READ paneWindowBackground
NOTIFY themeChanged)
Q_PROPERTY(QColor datasetWindowBorder
READ datasetWindowBorder
NOTIFY themeChanged)
Q_PROPERTY(QColor embeddedWindowBackground
READ embeddedWindowBackground
NOTIFY themeChanged) NOTIFY themeChanged)
Q_PROPERTY(QColor ledEnabled Q_PROPERTY(QColor ledEnabled
READ ledEnabled READ ledEnabled
@ -162,8 +156,8 @@ class ThemeManager : public QObject
Q_PROPERTY(QColor ledDisabled Q_PROPERTY(QColor ledDisabled
READ ledDisabled READ ledDisabled
NOTIFY themeChanged) NOTIFY themeChanged)
Q_PROPERTY(QColor csvHighlight Q_PROPERTY(QColor csvCheckbox
READ csvHighlight READ csvCheckbox
NOTIFY themeChanged) NOTIFY themeChanged)
Q_PROPERTY(QColor widgetForegroundPrimary Q_PROPERTY(QColor widgetForegroundPrimary
READ widgetForegroundPrimary READ widgetForegroundPrimary
@ -171,17 +165,8 @@ class ThemeManager : public QObject
Q_PROPERTY(QColor widgetForegroundSecondary Q_PROPERTY(QColor widgetForegroundSecondary
READ widgetForegroundSecondary READ widgetForegroundSecondary
NOTIFY themeChanged) NOTIFY themeChanged)
Q_PROPERTY(QColor widgetIndicator1 Q_PROPERTY(QColor widgetIndicator
READ widgetIndicator1 READ widgetIndicator
NOTIFY themeChanged)
Q_PROPERTY(QColor widgetIndicator2
READ widgetIndicator2
NOTIFY themeChanged)
Q_PROPERTY(QColor widgetIndicator3
READ widgetIndicator3
NOTIFY themeChanged)
Q_PROPERTY(QColor widgetAlternativeBackground
READ widgetAlternativeBackground
NOTIFY themeChanged) NOTIFY themeChanged)
Q_PROPERTY(QColor widgetControlBackground Q_PROPERTY(QColor widgetControlBackground
READ widgetControlBackground READ widgetControlBackground
@ -242,22 +227,17 @@ public:
QColor windowGradient2() const; QColor windowGradient2() const;
QColor alternativeHighlight() const; QColor alternativeHighlight() const;
QColor setupPanelBackground() const; QColor setupPanelBackground() const;
QColor datasetValue() const; QColor widgetTextPrimary() const;
QColor graphDialBorder() const; QColor widgetTextSecondary() const;
QColor datasetTextPrimary() const; QColor widgetWindowBackground() const;
QColor datasetTextSecondary() const; QColor widgetWindowBorder() const;
QColor datasetWindowBackground() const; QColor paneWindowBackground() const;
QColor datasetWindowBorder() const;
QColor embeddedWindowBackground() const;
QColor ledEnabled() const; QColor ledEnabled() const;
QColor ledDisabled() const; QColor ledDisabled() const;
QColor csvHighlight() const; QColor csvCheckbox() const;
QColor widgetForegroundPrimary() const; QColor widgetForegroundPrimary() const;
QColor widgetForegroundSecondary() const; QColor widgetForegroundSecondary() const;
QColor widgetIndicator1() const; QColor widgetIndicator() const;
QColor widgetIndicator2() const;
QColor widgetIndicator3() const;
QColor widgetAlternativeBackground() const;
QColor widgetControlBackground() const; QColor widgetControlBackground() const;
QColor connectButtonChecked() const; QColor connectButtonChecked() const;
QColor connectButtonUnchecked() const; QColor connectButtonUnchecked() const;
@ -314,22 +294,17 @@ private:
QColor m_windowGradient2; QColor m_windowGradient2;
QColor m_alternativeHighlight; QColor m_alternativeHighlight;
QColor m_setupPanelBackground; QColor m_setupPanelBackground;
QColor m_datasetValue; QColor m_widgetTextPrimary;
QColor m_graphDialBorder; QColor m_widgetTextSecondary;
QColor m_datasetTextPrimary; QColor m_widgetWindowBackground;
QColor m_datasetTextSecondary; QColor m_widgetWindowBorder;
QColor m_datasetWindowBackground; QColor m_paneWindowBackground;
QColor m_datasetWindowBorder;
QColor m_embeddedWindowBackground;
QColor m_ledEnabled; QColor m_ledEnabled;
QColor m_ledDisabled; QColor m_ledDisabled;
QColor m_csvHighlight; QColor m_csvCheckbox;
QColor m_widgetForegroundPrimary; QColor m_widgetForegroundPrimary;
QColor m_widgetForegroundSecondary; QColor m_widgetForegroundSecondary;
QColor m_widgetIndicator1; QColor m_widgetIndicator;
QColor m_widgetIndicator2;
QColor m_widgetIndicator3;
QColor m_widgetAlternativeBackground;
QColor m_widgetControlBackground; QColor m_widgetControlBackground;
QColor m_connectButtonChecked; QColor m_connectButtonChecked;
QColor m_connectButtonUnchecked; QColor m_connectButtonUnchecked;

View File

@ -63,7 +63,7 @@ Accelerometer::Accelerometer(const int index)
// Set gauge palette // Set gauge palette
QPalette palette; QPalette palette;
palette.setColor(QPalette::WindowText, theme->base()); palette.setColor(QPalette::WindowText, theme->base());
palette.setColor(QPalette::Text, theme->widgetIndicator1()); palette.setColor(QPalette::Text, theme->widgetIndicator());
m_gauge.setPalette(palette); m_gauge.setPalette(palette);
// Set widget pointer // Set widget pointer

View File

@ -46,11 +46,11 @@ Bar::Bar(const int index)
QPalette palette; QPalette palette;
palette.setColor(QPalette::Base, theme->base()); palette.setColor(QPalette::Base, theme->base());
palette.setColor(QPalette::Highlight, QColor("#f00")); palette.setColor(QPalette::Highlight, QColor("#f00"));
palette.setColor(QPalette::Text, theme->widgetIndicator1()); palette.setColor(QPalette::Text, theme->widgetIndicator());
palette.setColor(QPalette::Dark, theme->widgetIndicator1()); palette.setColor(QPalette::Dark, theme->widgetIndicator());
palette.setColor(QPalette::Light, theme->widgetIndicator1()); palette.setColor(QPalette::Light, theme->widgetIndicator());
palette.setColor(QPalette::ButtonText, theme->widgetIndicator1()); palette.setColor(QPalette::ButtonText, theme->widgetIndicator());
palette.setColor(QPalette::WindowText, theme->widgetIndicator1()); palette.setColor(QPalette::WindowText, theme->widgetIndicator());
m_thermo.setPalette(palette); m_thermo.setPalette(palette);
// Get thermo color // Get thermo color

View File

@ -35,8 +35,8 @@ BaseWidget::BaseWidget()
// Set window palette // Set window palette
QPalette palette; QPalette palette;
auto theme = Misc::ThemeManager::getInstance(); auto theme = Misc::ThemeManager::getInstance();
palette.setColor(QPalette::Base, theme->datasetWindowBackground()); palette.setColor(QPalette::Base, theme->widgetWindowBackground());
palette.setColor(QPalette::Window, theme->datasetWindowBackground()); palette.setColor(QPalette::Window, theme->widgetWindowBackground());
setPalette(palette); setPalette(palette);
// Configure label style // Configure label style
@ -47,7 +47,7 @@ BaseWidget::BaseWidget()
auto valueQSS = QSS("background-color:%1; color:%2; border:1px solid %3;", auto valueQSS = QSS("background-color:%1; color:%2; border:1px solid %3;",
theme->base(), theme->base(),
theme->widgetForegroundPrimary(), theme->widgetForegroundPrimary(),
theme->widgetIndicator1()); theme->widgetIndicator());
m_label.setStyleSheet(valueQSS); m_label.setStyleSheet(valueQSS);
// clang-format on // clang-format on
} }

View File

@ -62,7 +62,7 @@ Compass::Compass(const int index)
// Set compass palette // Set compass palette
QPalette palette; QPalette palette;
palette.setColor(QPalette::WindowText, theme->base()); palette.setColor(QPalette::WindowText, theme->base());
palette.setColor(QPalette::Text, theme->widgetIndicator1()); palette.setColor(QPalette::Text, theme->widgetIndicator());
m_compass.setPalette(palette); m_compass.setPalette(palette);
// Set widget pointer // Set widget pointer

View File

@ -53,15 +53,15 @@ DataGroup::DataGroup(const int index)
return; return;
// Generate widget stylesheets // Generate widget stylesheets
auto titleQSS = QSS("color:%1", theme->datasetTextPrimary()); auto titleQSS = QSS("color:%1", theme->widgetTextPrimary());
auto unitsQSS = QSS("color:%1", theme->datasetTextSecondary()); auto unitsQSS = QSS("color:%1", theme->widgetTextSecondary());
auto valueQSS = QSS("color:%1", theme->widgetForegroundPrimary()); auto valueQSS = QSS("color:%1", theme->widgetForegroundPrimary());
auto iconsQSS = QSS("color:%1; font-weight:600;", theme->datasetTextSecondary()); auto iconsQSS = QSS("color:%1; font-weight:600;", theme->widgetTextSecondary());
// Set window palette // Set window palette
QPalette windowPalette; QPalette windowPalette;
windowPalette.setColor(QPalette::Base, theme->datasetWindowBackground()); windowPalette.setColor(QPalette::Base, theme->widgetWindowBackground());
windowPalette.setColor(QPalette::Window, theme->datasetWindowBackground()); windowPalette.setColor(QPalette::Window, theme->widgetWindowBackground());
setPalette(windowPalette); setPalette(windowPalette);
// Configure scroll area container // Configure scroll area container

View File

@ -65,7 +65,7 @@ Gauge::Gauge(const int index)
// Set gauge palette // Set gauge palette
QPalette palette; QPalette palette;
palette.setColor(QPalette::WindowText, theme->base()); palette.setColor(QPalette::WindowText, theme->base());
palette.setColor(QPalette::Text, theme->widgetIndicator1()); palette.setColor(QPalette::Text, theme->widgetIndicator());
m_gauge.setPalette(palette); m_gauge.setPalette(palette);
// Set widget pointer // Set widget pointer

View File

@ -46,7 +46,7 @@ Gyroscope::Gyroscope(const int index)
// Set gauge palette // Set gauge palette
QPalette palette; QPalette palette;
palette.setColor(QPalette::WindowText, theme->base()); palette.setColor(QPalette::WindowText, theme->base());
palette.setColor(QPalette::Text, theme->widgetIndicator1()); palette.setColor(QPalette::Text, theme->widgetIndicator());
m_gauge.setPalette(palette); m_gauge.setPalette(palette);
// Set widget pointer // Set widget pointer

View File

@ -43,18 +43,18 @@ MultiPlot::MultiPlot(const int index)
// Set window palette // Set window palette
QPalette palette; QPalette palette;
palette.setColor(QPalette::Base, theme->datasetWindowBackground()); palette.setColor(QPalette::Base, theme->widgetWindowBackground());
palette.setColor(QPalette::Window, theme->datasetWindowBackground()); palette.setColor(QPalette::Window, theme->widgetWindowBackground());
setPalette(palette); setPalette(palette);
// Set plot palette // Set plot palette
palette.setColor(QPalette::Base, theme->base()); palette.setColor(QPalette::Base, theme->base());
palette.setColor(QPalette::Highlight, QColor("#f00")); palette.setColor(QPalette::Highlight, QColor("#f00"));
palette.setColor(QPalette::Text, theme->widgetIndicator1()); palette.setColor(QPalette::Text, theme->widgetIndicator());
palette.setColor(QPalette::Dark, theme->widgetIndicator1()); palette.setColor(QPalette::Dark, theme->widgetIndicator());
palette.setColor(QPalette::Light, theme->widgetIndicator1()); palette.setColor(QPalette::Light, theme->widgetIndicator());
palette.setColor(QPalette::ButtonText, theme->widgetIndicator1()); palette.setColor(QPalette::ButtonText, theme->widgetIndicator());
palette.setColor(QPalette::WindowText, theme->widgetIndicator1()); palette.setColor(QPalette::WindowText, theme->widgetIndicator());
m_plot.setPalette(palette); m_plot.setPalette(palette);
m_plot.setCanvasBackground(theme->base()); m_plot.setCanvasBackground(theme->base());
m_plot.setFrameStyle(QFrame::Plain); m_plot.setFrameStyle(QFrame::Plain);
@ -112,7 +112,7 @@ MultiPlot::MultiPlot(const int index)
* *
* If the widget is disabled (e.g. the user hides it, or the external * If the widget is disabled (e.g. the user hides it, or the external
* window is hidden), then the new data shall be saved to the plot * window is hidden), then the new data shall be saved to the plot
* vector, but the widget shall not be redrawn. * vectors, but the widget shall not be redrawn.
*/ */
void MultiPlot::updateData() void MultiPlot::updateData()
{ {

View File

@ -43,18 +43,18 @@ Plot::Plot(const int index)
// Set window palette // Set window palette
QPalette palette; QPalette palette;
palette.setColor(QPalette::Base, theme->datasetWindowBackground()); palette.setColor(QPalette::Base, theme->widgetWindowBackground());
palette.setColor(QPalette::Window, theme->datasetWindowBackground()); palette.setColor(QPalette::Window, theme->widgetWindowBackground());
setPalette(palette); setPalette(palette);
// Set plot palette // Set plot palette
palette.setColor(QPalette::Base, theme->base()); palette.setColor(QPalette::Base, theme->base());
palette.setColor(QPalette::Highlight, QColor("#f00")); palette.setColor(QPalette::Highlight, QColor("#f00"));
palette.setColor(QPalette::Text, theme->widgetIndicator1()); palette.setColor(QPalette::Text, theme->widgetIndicator());
palette.setColor(QPalette::Dark, theme->widgetIndicator1()); palette.setColor(QPalette::Dark, theme->widgetIndicator());
palette.setColor(QPalette::Light, theme->widgetIndicator1()); palette.setColor(QPalette::Light, theme->widgetIndicator());
palette.setColor(QPalette::ButtonText, theme->widgetIndicator1()); palette.setColor(QPalette::ButtonText, theme->widgetIndicator());
palette.setColor(QPalette::WindowText, theme->widgetIndicator1()); palette.setColor(QPalette::WindowText, theme->widgetIndicator());
m_plot.setPalette(palette); m_plot.setPalette(palette);
m_plot.setCanvasBackground(theme->base()); m_plot.setCanvasBackground(theme->base());
m_plot.setFrameStyle(QFrame::Plain); m_plot.setFrameStyle(QFrame::Plain);