update styledbutton to extend button

This commit is contained in:
Benjamin Palko 2025-08-29 17:22:04 -04:00
parent 160cd3c1d5
commit c983cf206b
12 changed files with 74 additions and 134 deletions

View file

@ -16,7 +16,7 @@ StyledButton {
showTemp = !showTemp;
}
content: RowLayout {
contentItem: RowLayout {
id: row
Ref {
service: SystemInfo
@ -28,8 +28,7 @@ StyledButton {
font.pixelSize: Dimensions.cpu.iconSize
font.bold: true
text: Icons.cpu
color: root.containsMouse ? Theme.palette.base300 : Theme.palette.basecontent
color: root.hovered ? Theme.palette.primarycontent : Theme.palette.basecontent
}
StyledText {
@ -37,8 +36,7 @@ StyledButton {
font.pixelSize: Dimensions.cpu.fontSize
text: ` ${(SystemInfo.cpuPerc * 100).toFixed()}%`
color: root.containsMouse ? Theme.palette.base300 : Theme.palette.basecontent
color: root.hovered ? Theme.palette.primarycontent : Theme.palette.basecontent
states: [
State {