Skip to content

Commit fe66b20

Browse files
committed
Fix three phase bar gauge background color for overview widget
Overview widgets in Dark mode already use the darkOk color as their background color. So, we need a different blue to use as the gauge background color in this case.
1 parent 382e8d9 commit fe66b20

File tree

5 files changed

+11
-2
lines changed

5 files changed

+11
-2
lines changed

components/ThreePhaseBarGauge.qml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Flow {
1717
property bool inputMode
1818
property int orientation: Qt.Vertical
1919
property bool animationEnabled
20+
property bool inOverviewWidget
2021

2122
readonly property real _longEdgeLength: orientation === Qt.Vertical ? height : width
2223
readonly property real _delegateLength: (_longEdgeLength - (spacing * (phaseRepeater.count - 1))) / phaseRepeater.count
@@ -67,7 +68,9 @@ Flow {
6768
id: cheapGauge
6869
CheapBarGauge {
6970
foregroundColor: Theme.color_darkOk,gaugeLoader.feedingToGrid ? Theme.color_green : Theme.statusColorValue(valueStatus)
70-
backgroundColor: Theme.color_darkOk,gaugeLoader.feedingToGrid ? Theme.color_darkGreen : Theme.statusColorValue(valueStatus, true)
71+
backgroundColor: Theme.color_darkOk,gaugeLoader.feedingToGrid ? Theme.color_darkGreen
72+
: root.inOverviewWidget && valueStatus === Theme.Ok ? Theme.color_darkishBlue
73+
: Theme.statusColorValue(valueStatus, true)
7174
valueType: root.valueType
7275
value: valueRange.valueAsRatio
7376
orientation: root.orientation
@@ -79,7 +82,9 @@ Flow {
7982
id: prettyGauge
8083
BarGauge {
8184
foregroundColor: Theme.color_darkOk,gaugeLoader.feedingToGrid ? Theme.color_green : Theme.statusColorValue(valueStatus)
82-
backgroundColor: Theme.color_darkOk,gaugeLoader.feedingToGrid ? Theme.color_darkGreen : Theme.statusColorValue(valueStatus, true)
85+
backgroundColor: Theme.color_darkOk,gaugeLoader.feedingToGrid ? Theme.color_darkGreen
86+
: root.inOverviewWidget && valueStatus === Theme.Ok ? Theme.color_darkishBlue
87+
: Theme.statusColorValue(valueStatus, true)
8388
valueType: root.valueType
8489
value: valueRange.valueAsRatio
8590
orientation: root.orientation

components/widgets/AcInputWidget.qml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ AcWidget {
6969
maximumValue: Global.acInputs.activeInputInfo.maximumCurrent
7070
inputMode: true
7171
animationEnabled: root.animationEnabled
72+
inOverviewWidget: true
7273
}
7374
}
7475

components/widgets/InverterChargerWidget.qml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ OverviewWidget {
6969
phaseModelProperty: "current"
7070
maximumValue: Global.system.ac.consumption.maximumCurrent
7171
animationEnabled: root.animationEnabled
72+
inOverviewWidget: true
7273
}
7374
}
7475
}

themes/color/Dark.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"color_dimRed": "#592220",
1212
"color_dimGreen": "#508135",
1313
"color_dimGray": "#7B7A76",
14+
"color_darkishBlue": "#1B3B5C",
1415
"color_darkBlue": "#11263B",
1516
"color_darkOrange": "#482D0E",
1617
"color_darkRed": "#491C1B",

themes/color/Light.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"color_dimRed": "#F0C3BF",
1212
"color_dimGreen": "#9BCB7E",
1313
"color_dimGray": "#7B7A76",
14+
"color_darkishBlue": "#C0D4E6",
1415
"color_darkBlue": "#C0D4E6",
1516
"color_darkOrange": "#F7DBB9",
1617
"color_darkRed": "#F8CAC6",

0 commit comments

Comments
 (0)