From 12fb88cab9790661e4b7d77ee6c310e4185753c3 Mon Sep 17 00:00:00 2001 From: Ad5001 Date: Sun, 30 Jan 2022 01:37:46 +0100 Subject: [PATCH] Fixing icon paths --- LogarithmPlotter/logarithmplotter.py | 9 ++++++--- .../ad5001/LogarithmPlotter/ObjectLists/EditorDialog.qml | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/LogarithmPlotter/logarithmplotter.py b/LogarithmPlotter/logarithmplotter.py index f9aa19a..fcd1c66 100644 --- a/LogarithmPlotter/logarithmplotter.py +++ b/LogarithmPlotter/logarithmplotter.py @@ -74,9 +74,12 @@ def run(): print("Loaded dependencies in " + str((dep_time - start_time)*1000) + "ms.") icon_fallbacks = QIcon.fallbackSearchPaths(); - icon_fallbacks.append(path.realpath(path.join(getcwd(), "qml", "eu", "ad5001", "LogarithmPlotter", "icons"))) - icon_fallbacks.append(path.realpath(path.join(getcwd(), "qml", "eu", "ad5001", "LogarithmPlotter", "icons", "settings"))) - icon_fallbacks.append(path.realpath(path.join(getcwd(), "qml", "eu", "ad5001", "LogarithmPlotter", "icons", "settings", "custom"))) + base_icon_path = path.join(getcwd(), "qml", "eu", "ad5001", "LogarithmPlotter", "icons") + icon_fallbacks.append(path.realpath(path.join(base_icon_path, "common"))) + icon_fallbacks.append(path.realpath(path.join(base_icon_path, "objects"))) + icon_fallbacks.append(path.realpath(path.join(base_icon_path, "history"))) + icon_fallbacks.append(path.realpath(path.join(base_icon_path, "settings"))) + icon_fallbacks.append(path.realpath(path.join(base_icon_path, "settings", "custom"))) QIcon.setFallbackSearchPaths(icon_fallbacks); app = QApplication(argv) diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/ObjectLists/EditorDialog.qml b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/ObjectLists/EditorDialog.qml index dd18a62..27f5b3e 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/ObjectLists/EditorDialog.qml +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/ObjectLists/EditorDialog.qml @@ -78,7 +78,7 @@ D.Dialog { id: nameProperty height: 30 label: qsTr("Name") - icon: "icons/settings/custom/label.svg" + icon: "icons/common/label.svg" min: 1 width: dlgProperties.width value: objEditor.obj.name @@ -105,7 +105,7 @@ D.Dialog { label: qsTr("Label content") model: [qsTr("null"), qsTr("name"), qsTr("name + value")] property var idModel: ["null", "name", "name + value"] - icon: "icons/settings/custom/label.svg" + icon: "icons/common/label.svg" currentIndex: idModel.indexOf(objEditor.obj.labelContent) onActivated: function(newIndex) { if(idModel[newIndex] != objEditor.obj.labelContent) {