diff --git a/qml/Common.qml b/qml/Common.qml index 9057ade..f86e41f 100644 --- a/qml/Common.qml +++ b/qml/Common.qml @@ -122,10 +122,17 @@ Item { }); } - Component.onCompleted: { + function updateStyleList() { + styles.length = 0; + stylesURL.length = 0; + stylesCFG.length = 0; const preset_list = NVG.Resources.filter(/advp.widget.mashiros.top/, /top.mashiros.advp-style/); parse_resource(preset_list, true); const third_list = NVG.Resources.filter(/.*/, /top.mashiros.advp-style/); parse_resource(third_list, false); } + + Component.onCompleted: { + updateStyleList(); + } } diff --git a/qml/Main.qml b/qml/Main.qml index 10858a7..f757f6c 100644 --- a/qml/Main.qml +++ b/qml/Main.qml @@ -50,7 +50,11 @@ T.Widget { menu: Menu { Action { text: qsTr("Settings") + "..." - onTriggered: styleDialog.active = true + enabled: !styleDialog.active + onTriggered: { + Common.updateStyleList(); + styleDialog.active = true + } } }