forked from Shinonome/dots-hyprland
player control: playpause button change radius according to state
This commit is contained in:
@@ -279,11 +279,12 @@ Item { // Player instance
|
|||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.bottom: sliderRow.top
|
anchors.bottom: sliderRow.top
|
||||||
anchors.bottomMargin: 5
|
anchors.bottomMargin: 5
|
||||||
implicitWidth: 44
|
property real size: 44
|
||||||
implicitHeight: 44
|
implicitWidth: size
|
||||||
|
implicitHeight: size
|
||||||
onClicked: playerController.player.togglePlaying();
|
onClicked: playerController.player.togglePlaying();
|
||||||
|
|
||||||
buttonRadius: Appearance.rounding.full
|
buttonRadius: playerController.player?.isPlaying ? Appearance?.rounding.small : size / 2
|
||||||
colBackground: playerController.player?.isPlaying ? blendedColors.colPrimary : blendedColors.colSecondaryContainer
|
colBackground: playerController.player?.isPlaying ? blendedColors.colPrimary : blendedColors.colSecondaryContainer
|
||||||
colBackgroundHover: playerController.player?.isPlaying ? blendedColors.colPrimaryHover : blendedColors.colSecondaryContainerHover
|
colBackgroundHover: playerController.player?.isPlaying ? blendedColors.colPrimaryHover : blendedColors.colSecondaryContainerHover
|
||||||
colRipple: playerController.player?.isPlaying ? blendedColors.colPrimaryActive : blendedColors.colSecondaryContainerActive
|
colRipple: playerController.player?.isPlaying ? blendedColors.colPrimaryActive : blendedColors.colSecondaryContainerActive
|
||||||
|
|||||||
Reference in New Issue
Block a user