diff --git a/assets/assets.qrc b/assets/assets.qrc index d85f31c7..f17ba088 100644 --- a/assets/assets.qrc +++ b/assets/assets.qrc @@ -109,5 +109,6 @@ themes/4_macOS_Light.json themes/5_macOS_Dark.json qml/Application.qml + themes/6_TVA.json diff --git a/assets/qml/PlatformDependent/Menubar.qml b/assets/qml/PlatformDependent/Menubar.qml index 5ec31e9b..865123ed 100644 --- a/assets/qml/PlatformDependent/Menubar.qml +++ b/assets/qml/PlatformDependent/Menubar.qml @@ -34,12 +34,12 @@ MenuBar { gradient: Gradient { GradientStop { position: 0 - color: Qt.lighter(app.windowBackgroundColor) + color: Qt.lighter(Cpp_ThemeManager.windowBackground) } GradientStop { position: 1 - color: app.windowBackgroundColor + color: Cpp_ThemeManager.windowBackground } } } diff --git a/assets/qml/Widgets/AccelerometerDelegate.qml b/assets/qml/Widgets/AccelerometerDelegate.qml index 782e65b4..a01bef4b 100644 --- a/assets/qml/Widgets/AccelerometerDelegate.qml +++ b/assets/qml/Widgets/AccelerometerDelegate.qml @@ -187,7 +187,7 @@ Window { Label { font.pixelSize: 12 font.family: app.monoFont - color: Cpp_ThemeManager.widgettextPrimary + color: Cpp_ThemeManager.widgetForegroundPrimary Layout.alignment: Qt.AlignHCenter text: qsTr("%1 G MAX").arg(root.max.toFixed(2)) } @@ -195,7 +195,7 @@ Window { Label { font.pixelSize: 12 font.family: app.monoFont - color: Cpp_ThemeManager.widgettextPrimary + color: Cpp_ThemeManager.widgetForegroundPrimary Layout.alignment: Qt.AlignHCenter text: qsTr("%1 G MIN").arg(root.min.toFixed(2)) } @@ -208,7 +208,7 @@ Window { font.bold: true font.pixelSize: 12 font.family: app.monoFont - color: Cpp_ThemeManager.widgettextPrimary + color: Cpp_ThemeManager.widgetForegroundPrimary Layout.alignment: Qt.AlignHCenter text: qsTr("%1 G ACT").arg(root.meanGForce.toFixed(2)) @@ -217,7 +217,7 @@ Window { color: "transparent" anchors.fill: parent anchors.margins: -app.spacing - border.color: Cpp_ThemeManager.widgettextPrimary + border.color: Cpp_ThemeManager.widgetForegroundPrimary } } diff --git a/assets/qml/Widgets/AccelerometerGaugeDelegate.qml b/assets/qml/Widgets/AccelerometerGaugeDelegate.qml index 26c91567..47ba4c67 100644 --- a/assets/qml/Widgets/AccelerometerGaugeDelegate.qml +++ b/assets/qml/Widgets/AccelerometerGaugeDelegate.qml @@ -70,7 +70,7 @@ Rectangle { text: root.title anchors.centerIn: parent font.family: app.monoFont - color: Cpp_ThemeManager.widgettextSecondary + color: Cpp_ThemeManager.widgetForegroundSecondary anchors.verticalCenterOffset: 32 } @@ -81,7 +81,7 @@ Rectangle { font.pixelSize: 14 anchors.centerIn: parent font.family: app.monoFont - color: Cpp_ThemeManager.widgettextPrimary + color: Cpp_ThemeManager.widgetForegroundPrimary visible: root.valueLabelVisible anchors.verticalCenterOffset: 56 text: root.currentValue.toFixed(3) diff --git a/assets/qml/Widgets/BarDelegate.qml b/assets/qml/Widgets/BarDelegate.qml index d1595526..b7a316fb 100644 --- a/assets/qml/Widgets/BarDelegate.qml +++ b/assets/qml/Widgets/BarDelegate.qml @@ -164,7 +164,7 @@ Window { Label { font.family: app.monoFont - color: Cpp_ThemeManager.widgettextPrimary + color: Cpp_ThemeManager.widgetForegroundPrimary Layout.alignment: Qt.AlignHCenter text: root.maximumValue.toFixed(2) + " " + root.units } @@ -172,7 +172,7 @@ Window { Rectangle { width: 2 Layout.fillHeight: true - color: Cpp_ThemeManager.widgettextSecondary + color: Cpp_ThemeManager.widgetForegroundSecondary Layout.alignment: Qt.AlignHCenter } @@ -180,7 +180,7 @@ Window { font.bold: true font.pixelSize: 16 font.family: app.monoFont - color: Cpp_ThemeManager.widgettextPrimary + color: Cpp_ThemeManager.widgetForegroundPrimary Layout.alignment: Qt.AlignHCenter text: (root.currentValue > root.maximumValue ? root.maximumValue.toFixed(2) : root.currentValue.toFixed(2)) + " " + root.units @@ -190,20 +190,20 @@ Window { anchors.fill: parent color: "transparent" anchors.margins: -app.spacing - border.color: Cpp_ThemeManager.widgettextPrimary + border.color: Cpp_ThemeManager.widgetForegroundPrimary } } Rectangle { width: 2 Layout.fillHeight: true - color: Cpp_ThemeManager.widgettextSecondary + color: Cpp_ThemeManager.widgetForegroundSecondary Layout.alignment: Qt.AlignHCenter } Label { font.family: app.monoFont - color: Cpp_ThemeManager.widgettextPrimary + color: Cpp_ThemeManager.widgetForegroundPrimary Layout.alignment: Qt.AlignHCenter text: root.minimumValue.toFixed(2) + " " + root.units } diff --git a/assets/qml/Widgets/CompassDelegate.qml b/assets/qml/Widgets/CompassDelegate.qml index 848558c5..57b258ce 100644 --- a/assets/qml/Widgets/CompassDelegate.qml +++ b/assets/qml/Widgets/CompassDelegate.qml @@ -131,7 +131,7 @@ Window { font.pixelSize: 24 text: root.direction font.family: app.monoFont - color: Cpp_ThemeManager.widgettextPrimary + color: Cpp_ThemeManager.widgetForegroundPrimary Layout.alignment: Qt.AlignHCenter } } diff --git a/assets/qml/Widgets/GaugeDelegate.qml b/assets/qml/Widgets/GaugeDelegate.qml index 6385a187..623c243a 100644 --- a/assets/qml/Widgets/GaugeDelegate.qml +++ b/assets/qml/Widgets/GaugeDelegate.qml @@ -128,7 +128,7 @@ Window { font.bold: true anchors.centerIn: parent font.family: app.monoFont - color: Cpp_ThemeManager.widgettextPrimary + color: Cpp_ThemeManager.widgetForegroundPrimary font.pixelSize: Math.max(12, gauge.height / 15) anchors.verticalCenterOffset: parent.height * 0.17 text: (root.currentValue > root.maximumValue ? root.maximumValue.toFixed(2) : diff --git a/assets/qml/Widgets/GraphDelegate.qml b/assets/qml/Widgets/GraphDelegate.qml index cf92e71c..c168f5bb 100644 --- a/assets/qml/Widgets/GraphDelegate.qml +++ b/assets/qml/Widgets/GraphDelegate.qml @@ -34,7 +34,7 @@ Window { showIcon: false visible: opacity > 0 opacity: enabled ? 1 : 0 - borderColor: root.headerVisible ? Cpp_ThemeManager.datasetTextPrimarySecondary : "transparent" + borderColor: root.headerVisible ? Cpp_ThemeManager.datasetTextSecondary : "transparent" title: Cpp_UI_GraphProvider.getTitle(graphId) @@ -87,7 +87,7 @@ Window { labelsVisible: false tickType: ValueAxis.TicksFixed labelsFont.family: app.monoFont - gridLineColor: Cpp_ThemeManager.datasetTextPrimarySecondary + gridLineColor: Cpp_ThemeManager.datasetTextSecondary max: Cpp_UI_GraphProvider.displayedPoints } @@ -98,8 +98,8 @@ Window { lineVisible: false tickType: ValueAxis.TicksFixed labelsFont.family: app.monoFont - labelsColor: Cpp_ThemeManager.datasetTextPrimarySecondary - gridLineColor: Cpp_ThemeManager.datasetTextPrimarySecondary + labelsColor: Cpp_ThemeManager.datasetTextSecondary + gridLineColor: Cpp_ThemeManager.datasetTextSecondary } LineSeries { @@ -109,7 +109,7 @@ Window { useOpenGL: true capStyle: Qt.RoundCap axisYRight: positionAxis - color: Cpp_ThemeManager.datasetTextPrimaryPrimary + color: Cpp_ThemeManager.datasetTextPrimary } } } diff --git a/assets/qml/Widgets/GroupDelegate.qml b/assets/qml/Widgets/GroupDelegate.qml index ce44e27b..23108631 100644 --- a/assets/qml/Widgets/GroupDelegate.qml +++ b/assets/qml/Widgets/GroupDelegate.qml @@ -34,7 +34,7 @@ Window { showIcon: false visible: opacity > 0 opacity: enabled ? 1 : 0 - borderColor: Cpp_ThemeManager.datasetTextPrimarySecondary + borderColor: Cpp_ThemeManager.datasetTextSecondary title: group != null ? group.title : "" property int groupId: 0 @@ -72,7 +72,7 @@ Window { width: _sv.width - (_sv.ScrollBar.vertical.visible ? 10 : 0) Repeater { - model: group !== null ? group.datasetCount : 0 + model: group != null ? group.datasetCount : 0 delegate: DataDelegate { Layout.fillWidth: true diff --git a/assets/qml/Widgets/GyroDelegate.qml b/assets/qml/Widgets/GyroDelegate.qml index bc0ae0c9..42ced1b3 100644 --- a/assets/qml/Widgets/GyroDelegate.qml +++ b/assets/qml/Widgets/GyroDelegate.qml @@ -150,7 +150,7 @@ Window { Layout.minimumHeight: 120 Layout.maximumHeight: 120 Layout.alignment: Qt.AlignVCenter - border.color: Cpp_ThemeManager.widgettextPrimary + border.color: Cpp_ThemeManager.widgetForegroundPrimary function formatAngle(angle) { var str @@ -176,7 +176,7 @@ Window { Label { font.pixelSize: 12 font.family: app.monoFont - color: Cpp_ThemeManager.widgettextPrimary + color: Cpp_ThemeManager.widgetForegroundPrimary Layout.alignment: Qt.AlignLeft text: qsTr("%1° YAW").arg(controls.formatAngle(root.yawAngle)) } @@ -184,7 +184,7 @@ Window { Label { font.pixelSize: 12 font.family: app.monoFont - color: Cpp_ThemeManager.widgettextPrimary + color: Cpp_ThemeManager.widgetForegroundPrimary Layout.alignment: Qt.AlignLeft text: qsTr("%1° ROLL").arg(controls.formatAngle(root.rollAngle)) } @@ -192,7 +192,7 @@ Window { Label { font.pixelSize: 12 font.family: app.monoFont - color: Cpp_ThemeManager.widgettextPrimary + color: Cpp_ThemeManager.widgetForegroundPrimary Layout.alignment: Qt.AlignLeft text: qsTr("%1° PITCH").arg(controls.formatAngle(root.pitchAngle)) } diff --git a/assets/qml/Widgets/Window.qml b/assets/qml/Widgets/Window.qml index 1bffdc9e..05117cf2 100644 --- a/assets/qml/Widgets/Window.qml +++ b/assets/qml/Widgets/Window.qml @@ -40,7 +40,7 @@ Page { property int radius: root.borderWidth + 2 property color titleColor: palette.brightText property color borderColor: palette.highlight - property color backgroundColor: Qt.darker(palette.base) + property color backgroundColor: Cpp_ThemeManager.windowBackground property alias headerDoubleClickEnabled: headerMouseArea.enabled property color gradientColor: root.gradient ? Cpp_ThemeManager.windowGradient : root.borderColor diff --git a/assets/qml/Windows/DataGrid.qml b/assets/qml/Windows/DataGrid.qml index aaf1f715..48429b58 100644 --- a/assets/qml/Windows/DataGrid.qml +++ b/assets/qml/Windows/DataGrid.qml @@ -463,6 +463,7 @@ Control { borderColor: backgroundColor enabled: groupWindow.visible headerDoubleClickEnabled: false + titleColor: Cpp_ThemeManager.text } } } @@ -516,6 +517,7 @@ Control { borderColor: backgroundColor headerDoubleClickEnabled: false icon.source: "qrc:/icons/chart.svg" + titleColor: Cpp_ThemeManager.text } } } diff --git a/assets/qml/Windows/Widgets.qml b/assets/qml/Windows/Widgets.qml index 80c8e735..ad094a52 100644 --- a/assets/qml/Windows/Widgets.qml +++ b/assets/qml/Windows/Widgets.qml @@ -134,6 +134,7 @@ Control { anchors.fill: parent borderColor: backgroundColor headerDoubleClickEnabled: false + titleColor: Cpp_ThemeManager.text } } } @@ -177,6 +178,7 @@ Control { anchors.fill: parent borderColor: backgroundColor headerDoubleClickEnabled: false + titleColor: Cpp_ThemeManager.text } } } @@ -220,6 +222,7 @@ Control { anchors.fill: parent borderColor: backgroundColor headerDoubleClickEnabled: false + titleColor: Cpp_ThemeManager.text } } } @@ -237,11 +240,11 @@ Control { Widgets.GaugeDelegate { datasetIndex: index anchors.fill: parent - onHeaderDoubleClicked: windowBar.show() + onHeaderDoubleClicked: windowGauge.show() } QtWindow.Window { - id: windowBar + id: windowGauge width: 640 height: 480 minimumWidth: root.minimumWidgetSize * 1.2 @@ -263,6 +266,7 @@ Control { anchors.fill: parent borderColor: backgroundColor headerDoubleClickEnabled: false + titleColor: Cpp_ThemeManager.text } } } @@ -306,6 +310,7 @@ Control { anchors.fill: parent borderColor: backgroundColor headerDoubleClickEnabled: false + titleColor: Cpp_ThemeManager.text } } } @@ -349,6 +354,7 @@ Control { anchors.fill: parent borderColor: backgroundColor headerDoubleClickEnabled: false + titleColor: Cpp_ThemeManager.text } } } diff --git a/assets/themes/1_Light.json b/assets/themes/1_Light.json index dc672124..e9543cda 100644 --- a/assets/themes/1_Light.json +++ b/assets/themes/1_Light.json @@ -8,13 +8,13 @@ "window":"#dec8c0", "text":"#000000", "midlight":"#f1ebe6", - "highlight":"#bf625f", - "brightText":"#000000", + "highlight":"#fa7358", + "brightText":"#ffffff", "buttonText":"#000000", "windowText":"#000000", "toolTipBase":"#191f4d", "toolTipText":"#e6e0b2", - "highlightedText":"#e6e0b2", + "highlightedText":"#191f4d", "toolbarGradient1":"#dec8c0", "toolbarGradient2":"#eed8d0", "consoleText":"#713262", @@ -22,8 +22,8 @@ "consoleButton":"#e9dcd5", "consoleWindow":"#f2ede8", "windowBackground":"#ede6df", - "windowGradient":"#fa7358", - "alternativeHighlight":"#28d29f", + "windowGradient":"#df424f", + "alternativeHighlight":"#bf625f", "setupPanelBackground":"#e9dcd5", "graphDialBorder":"#111111", "datasetTextPrimary":"#191f4d", @@ -48,8 +48,8 @@ "mapHorizon":"#dedede", "mapSkyLowAltitude":"#6ba9d1", "mapSkyHighAltitude":"#283e51", - "connectButtonChecked":"#d72d60", - "connectButtonUnchecked":"#2eed5c", + "connectButtonChecked":"#bf625f", + "connectButtonUnchecked":"#bf625f", "barWidgetColors":[ "#f94144", "#f3722c", diff --git a/assets/themes/6_TVA.json b/assets/themes/6_TVA.json new file mode 100644 index 00000000..4445e184 --- /dev/null +++ b/assets/themes/6_TVA.json @@ -0,0 +1,66 @@ +{ + "name":"TVA", + "author":"Alex Spataru", + "colors":{ + "base":"#21373f", + "link":"#409da0", + "button":"#21373f", + "window":"#21373f", + "text":"#ffffff", + "midlight":"#0e1419", + "highlight":"#409da0", + "brightText":"#ffffff", + "buttonText":"#ffffff", + "windowText":"#ffffff", + "toolTipBase":"#e6e0b2", + "toolTipText":"#e6e0b2", + "highlightedText":"#e6e0b2", + "toolbarGradient1":"#21373f", + "toolbarGradient2":"#11272f", + "consoleText":"#8ecd9d", + "consoleBase":"#121218", + "consoleButton":"#16232a", + "consoleWindow":"#0d1217", + "windowBackground":"#121920", + "windowGradient":"#058ca7", + "alternativeHighlight":"#d72d60", + "setupPanelBackground":"#16232a", + "graphDialBorder":"#eeeeee", + "datasetTextPrimary":"#e6e0b2", + "datasetTextSecondary":"#517497", + "ledEnabled":"#d72d60", + "ledDisabled":"#2d6073", + "csvHighlight":"#2e895c", + "widgetBackground":"#09090c", + "widgetForegroundPrimary":"#8ecd9d", + "widgetForegroundSecondary":"#517497", + "widgetIndicator1":"#e6e0b2", + "widgetIndicator2":"#d72d60", + "widgetIndicator3":"#2d6073", + "widgetAlternativeBackground":"#121218", + "widgetControlBackground":"#111111", + "gyroSky":"#5c93c5", + "gyroText":"#ffffff", + "gyroGround":"#7d5233", + "mapDotBackground":"#ff0000", + "mapDotForeground":"#ffffff", + "mapBorder":"#646464", + "mapHorizon":"#dedede", + "mapSkyLowAltitude":"#6ba9d1", + "mapSkyHighAltitude":"#283e51", + "connectButtonChecked":"#d72d60", + "connectButtonUnchecked":"#2eed5c", + "barWidgetColors":[ + "#f94144", + "#f3722c", + "#f8961e", + "#f9844a", + "#f9c74f", + "#90be6d", + "#43aa8b", + "#4d908e", + "#577590", + "#277da1" + ] + } +}