Theme-related fixes

This commit is contained in:
Alex Spataru 2021-09-05 03:20:08 -05:00
parent e869d67b13
commit f5388a5ab1
15 changed files with 112 additions and 37 deletions

View File

@ -109,5 +109,6 @@
<file>themes/4_macOS_Light.json</file>
<file>themes/5_macOS_Dark.json</file>
<file>qml/Application.qml</file>
<file>themes/6_TVA.json</file>
</qresource>
</RCC>

View File

@ -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
}
}
}

View File

@ -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
}
}

View File

@ -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)

View File

@ -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
}

View File

@ -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
}
}

View File

@ -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) :

View File

@ -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
}
}
}

View File

@ -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

View File

@ -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))
}

View File

@ -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

View File

@ -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
}
}
}

View File

@ -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
}
}
}

View File

@ -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",

66
assets/themes/6_TVA.json Normal file
View File

@ -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"
]
}
}