设置前刷新样式列表,加载第三方样式
This commit is contained in:
parent
6df0edd06c
commit
d36ea57d51
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user