Refactor user_files module & add live reloading
- Cleaner design for the backend user_files classes and simplified interaction with QML - Config and theme files will now automatically reload when changed on disk - Removed manual reload keybind and button
This commit is contained in:
@@ -28,41 +28,18 @@ Item {
|
||||
readonly property alias debugConsole: debugConsole
|
||||
readonly property alias mainPane: mainPane
|
||||
readonly property alias pageLoader: pageLoader
|
||||
readonly property alias pressAnimation: pressAnimation
|
||||
readonly property alias fontMetrics: fontMetrics
|
||||
readonly property alias idleManager: idleManager
|
||||
|
||||
function reloadSettings() {
|
||||
py.loadSettings(() => {
|
||||
image.reload()
|
||||
mainUI.pressAnimation.start()
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
focus: true
|
||||
Component.onCompleted: window.mainUI = mainUI
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
HShortcut {
|
||||
sequences: window.settings.keys.startPythonDebugger
|
||||
onActivated: py.call("BRIDGE.pdb")
|
||||
}
|
||||
|
||||
HShortcut {
|
||||
sequences: window.settings.keys.reloadConfig
|
||||
onActivated: reloadSettings()
|
||||
}
|
||||
|
||||
HShortcut {
|
||||
sequences: window.settings.keys.zoomIn
|
||||
onActivated: {
|
||||
|
Reference in New Issue
Block a user