fix: bluetooth battery bar (#1153)
Signed-off-by: Dan Griffiths <dgriffiths@widgitlabs.com>
This commit is contained in:
parent
d5f5985db6
commit
5b2e1a6231
1 changed files with 3 additions and 9 deletions
|
|
@ -358,18 +358,12 @@ StyledFlickable {
|
|||
}
|
||||
|
||||
RowLayout {
|
||||
id: batteryPercent
|
||||
Layout.topMargin: Appearance.spacing.small / 2
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: Appearance.padding.smaller
|
||||
spacing: Appearance.spacing.small / 2
|
||||
|
||||
StyledRect {
|
||||
Layout.fillHeight: true
|
||||
implicitWidth: root.device?.batteryAvailable ? parent.width * root.device.battery : 0
|
||||
radius: Appearance.rounding.full
|
||||
color: Colours.palette.m3primary
|
||||
}
|
||||
|
||||
StyledRect {
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
|
|
@ -377,12 +371,12 @@ StyledFlickable {
|
|||
color: Colours.palette.m3secondaryContainer
|
||||
|
||||
StyledRect {
|
||||
anchors.right: parent.right
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.margins: parent.height * 0.25
|
||||
|
||||
implicitWidth: height
|
||||
implicitWidth: root.device?.batteryAvailable ? batteryPercent.width * root.device.battery : 0
|
||||
radius: Appearance.rounding.full
|
||||
color: Colours.palette.m3primary
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue