fix: buttons not respecting shapeMorph prop
This commit is contained in:
parent
0210f98686
commit
362863dd74
2 changed files with 4 additions and 1 deletions
|
|
@ -43,7 +43,7 @@ StyledRect {
|
||||||
property color disabledOnColour: Qt.alpha(Colours.palette.m3onSurface, 0.38)
|
property color disabledOnColour: Qt.alpha(Colours.palette.m3onSurface, 0.38)
|
||||||
|
|
||||||
property bool internalChecked
|
property bool internalChecked
|
||||||
property real shapeMorphExpansion: pressed ? 1.16 : 1
|
property real shapeMorphExpansion: shapeMorph && pressed ? 1.16 : 1
|
||||||
readonly property color onColour: disabled ? disabledOnColour : internalChecked ? activeOnColour : inactiveOnColour
|
readonly property color onColour: disabled ? disabledOnColour : internalChecked ? activeOnColour : inactiveOnColour
|
||||||
|
|
||||||
signal clicked
|
signal clicked
|
||||||
|
|
|
||||||
|
|
@ -135,6 +135,7 @@ Item {
|
||||||
type: IconButton.Tonal
|
type: IconButton.Tonal
|
||||||
icon: "skip_previous"
|
icon: "skip_previous"
|
||||||
isRound: true
|
isRound: true
|
||||||
|
shapeMorph: true
|
||||||
disabled: !Players.active?.canGoPrevious
|
disabled: !Players.active?.canGoPrevious
|
||||||
onClicked: Players.active?.previous()
|
onClicked: Players.active?.previous()
|
||||||
}
|
}
|
||||||
|
|
@ -143,6 +144,7 @@ Item {
|
||||||
fillWidth: true
|
fillWidth: true
|
||||||
icon: Players.active?.isPlaying ? "pause" : "play_arrow"
|
icon: Players.active?.isPlaying ? "pause" : "play_arrow"
|
||||||
isRound: true
|
isRound: true
|
||||||
|
shapeMorph: true
|
||||||
checked: Players.active?.isPlaying ?? false
|
checked: Players.active?.isPlaying ?? false
|
||||||
disabled: !Players.active?.canTogglePlaying
|
disabled: !Players.active?.canTogglePlaying
|
||||||
onClicked: Players.active?.togglePlaying()
|
onClicked: Players.active?.togglePlaying()
|
||||||
|
|
@ -152,6 +154,7 @@ Item {
|
||||||
type: IconButton.Tonal
|
type: IconButton.Tonal
|
||||||
icon: "skip_next"
|
icon: "skip_next"
|
||||||
isRound: true
|
isRound: true
|
||||||
|
shapeMorph: true
|
||||||
disabled: !Players.active?.canGoNext
|
disabled: !Players.active?.canGoNext
|
||||||
onClicked: Players.active?.next()
|
onClicked: Players.active?.next()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue