Commit 5b209a04 authored by Ronan Abhamon's avatar Ronan Abhamon

feat(PopupStyle): add `opening/closing`Duration properties

parent 732d143d
...@@ -122,7 +122,7 @@ Item { ...@@ -122,7 +122,7 @@ Item {
to: 'Opened' to: 'Opened'
NumberAnimation { NumberAnimation {
duration: 250 duration: PopupStyle.animation.openingDuration
easing.type: Easing.InOutQuad easing.type: Easing.InOutQuad
property: 'opacity' property: 'opacity'
target: menu target: menu
...@@ -130,7 +130,7 @@ Item { ...@@ -130,7 +130,7 @@ Item {
SequentialAnimation { SequentialAnimation {
PauseAnimation { PauseAnimation {
duration: 250 duration: PopupStyle.animation.closingDuration
} }
ScriptAction { ScriptAction {
...@@ -144,22 +144,22 @@ Item { ...@@ -144,22 +144,22 @@ Item {
to: '' to: ''
NumberAnimation { NumberAnimation {
duration: 250 duration: PopupStyle.animation.openingDuration
easing.type: Easing.InOutQuad easing.type: Easing.InOutQuad
property: 'opacity' property: 'opacity'
target: menu target: menu
} }
NumberAnimation { NumberAnimation {
duration: 250 duration: PopupStyle.animation.closingDuration
easing.type: Easing.InOutQuad easing.type: Easing.InOutQuad
property: 'visible' // Ugly, use `NumberAnimation` on bool. property: 'visible' // Ugly, use `NumberAnimation` with a bool.
target: menu target: menu
} }
SequentialAnimation { SequentialAnimation {
PauseAnimation { PauseAnimation {
duration: 250 duration: PopupStyle.animation.closingDuration
} }
ScriptAction { ScriptAction {
......
...@@ -21,6 +21,8 @@ Item { ...@@ -21,6 +21,8 @@ Item {
property alias placeholderText: searchField.placeholderText property alias placeholderText: searchField.placeholderText
property bool _isOpen: false
signal menuClosed signal menuClosed
signal menuOpened signal menuOpened
......
...@@ -8,6 +8,11 @@ import Common 1.0 ...@@ -8,6 +8,11 @@ import Common 1.0
QtObject { QtObject {
property color backgroundColor: Colors.k property color backgroundColor: Colors.k
property QtObject animation: QtObject {
property int openingDuration: 250
property int closingDuration: 250
}
property QtObject shadow: QtObject { property QtObject shadow: QtObject {
property color color: Colors.f property color color: Colors.f
property int horizontalOffset: 2 property int horizontalOffset: 2
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment