Compare commits

...

2 commits

Author SHA1 Message Date
Benjamin Palko
69cb49c584 limit decimal amount 2025-09-04 10:20:17 -04:00
Benjamin Palko
ee8f3d9d7b cleaner way to write it 2025-09-04 10:15:41 -04:00
2 changed files with 3 additions and 6 deletions

View file

@ -53,7 +53,7 @@ StyledButton {
}
return Theme.palette.basecontent;
}
text: `${root.laptopBattery.percentage * 100}%`
text: `${(root.laptopBattery.percentage.toFixed(2) * 100)}%`
}
}
visible: laptopBattery

View file

@ -4,10 +4,7 @@ import QtQuick
Text {
font.family: Theme.fontFamily
color: Theme.palette.basecontent
Behavior on color {
ColorAnimation {
duration: 200
easing.type: Easing.InOutQuad
}
ColorAnimation on color {
duration: 100
}
}