Add animation when reloading config file
This commit is contained in:
parent
eb97f08d6a
commit
5dc6c071d6
|
@ -19,7 +19,7 @@ Item {
|
||||||
|
|
||||||
Shortcut {
|
Shortcut {
|
||||||
sequences: settings.keys ? settings.keys.reloadConfig : []
|
sequences: settings.keys ? settings.keys.reloadConfig : []
|
||||||
onActivated: py.loadSettings()
|
onActivated: py.loadSettings(() => { mainUI.pressAnimation.start() })
|
||||||
}
|
}
|
||||||
|
|
||||||
Shortcut {
|
Shortcut {
|
||||||
|
|
|
@ -11,6 +11,19 @@ import "SidePane"
|
||||||
HRectangle {
|
HRectangle {
|
||||||
id: mainUI
|
id: mainUI
|
||||||
color: theme.ui.background
|
color: theme.ui.background
|
||||||
|
Component.onCompleted: window.mainUI = mainUI
|
||||||
|
|
||||||
|
property alias pressAnimation: _pressAnimation
|
||||||
|
|
||||||
|
SequentialAnimation {
|
||||||
|
id: _pressAnimation
|
||||||
|
HNumberAnimation {
|
||||||
|
target: mainUI; property: "scale"; from: 1.0; to: 0.9
|
||||||
|
}
|
||||||
|
HNumberAnimation {
|
||||||
|
target: mainUI; property: "scale"; from: 0.9; to: 1.0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: py
|
target: py
|
||||||
|
|
|
@ -28,6 +28,8 @@ ApplicationWindow {
|
||||||
property bool debug: false
|
property bool debug: false
|
||||||
property bool ready: false
|
property bool ready: false
|
||||||
|
|
||||||
|
property var mainUI: null
|
||||||
|
|
||||||
// Note: settingsChanged(), uiStateChanged(), etc must be called manually
|
// Note: settingsChanged(), uiStateChanged(), etc must be called manually
|
||||||
property var settings: ({})
|
property var settings: ({})
|
||||||
onSettingsChanged: py.saveConfig("ui_settings", settings)
|
onSettingsChanged: py.saveConfig("ui_settings", settings)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user