Modify SwitchIndicator animation curve

pull/19/head
reionwong 4 years ago
parent 23e4eaa8cf
commit 290982b256

@ -33,9 +33,9 @@ Item {
property alias background: _background
property color backgroundColor: "transparent"
property color hoveredColor: FishUI.Theme.darkMode ? Qt.lighter(FishUI.Theme.backgroundColor, 2)
: Qt.darker(FishUI.Theme.backgroundColor, 1.2)
: Qt.darker(FishUI.Theme.backgroundColor, 1.1)
property color pressedColor: FishUI.Theme.darkMode ? Qt.lighter(FishUI.Theme.backgroundColor, 1.5)
: Qt.darker(FishUI.Theme.backgroundColor, 1.3)
: Qt.darker(FishUI.Theme.backgroundColor, 1.2)
property alias source: _image.source
property alias image: _image
signal clicked()

@ -49,7 +49,7 @@ T.Button
implicitHeight: FishUI.Units.iconSizes.medium + FishUI.Units.smallSpacing
Rectangle {
id: _border
id: _background
anchors.fill: parent
radius: FishUI.Theme.mediumRadius
border.width: 1

@ -33,11 +33,13 @@ Item {
height: 16
radius: width / 2
color: control.enabled ? "white" : "transparent"
Behavior on x {
enabled: !control.pressed
SmoothedAnimation {
duration: 300
easing.type: Easing.InOutCubic
NumberAnimation {
duration: 250
easing.type: Easing.OutSine
}
}
}

@ -12,6 +12,8 @@
<file>RadioButton.qml</file>
<file>RadioIndicator.qml</file>
<file>Slider.qml</file>
<file>Switch.qml</file>
<file>SwitchIndicator.qml</file>
<file>TabBar.qml</file>
<file>TabButton.qml</file>
<file>TextArea.qml</file>

Loading…
Cancel
Save