pass color and rotation
This commit is contained in:
parent
24f932f8d1
commit
c5ac7fe773
1 changed files with 11 additions and 1 deletions
|
|
@ -11,6 +11,8 @@ RoundButton {
|
||||||
}
|
}
|
||||||
|
|
||||||
property alias border: rect.border
|
property alias border: rect.border
|
||||||
|
property color color: hovered ? Theme.palette.primarycontent : Theme.palette.basecontent
|
||||||
|
property int rotation: 0
|
||||||
|
|
||||||
font.family: loader.font.family
|
font.family: loader.font.family
|
||||||
font.pixelSize: 18
|
font.pixelSize: 18
|
||||||
|
|
@ -22,14 +24,22 @@ RoundButton {
|
||||||
}
|
}
|
||||||
|
|
||||||
contentItem: Text {
|
contentItem: Text {
|
||||||
|
id: icon
|
||||||
font: control.font
|
font: control.font
|
||||||
text: control.text
|
text: control.text
|
||||||
color: control.hovered ? Theme.palette.primarycontent : Theme.palette.basecontent
|
color: control.color
|
||||||
Behavior on color {
|
Behavior on color {
|
||||||
ColorAnimation {
|
ColorAnimation {
|
||||||
duration: 100
|
duration: 100
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
rotation: control.rotation
|
||||||
|
Behavior on rotation {
|
||||||
|
RotationAnimation {
|
||||||
|
duration: 200
|
||||||
|
easing.type: Easing.InOutCubic
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue