diff --git a/qml/Icon.qml b/qml/Icon.qml index e87ec16..92a9540 100644 --- a/qml/Icon.qml +++ b/qml/Icon.qml @@ -47,7 +47,7 @@ Page { activated = !activated iconEditor.corners[idCell] = activated py.importModule("main", function(){ - py.call("main.sailify", [(iconEditor.attrs.old_icon || iconEditor.attrs.Icon).toString(), iconEditor.corners], function(result){ + py.call("main.sailify", [(iconEditor.attrs.old_icon || iconEditor.attrs.Icon).toString(), iconEditor.corners, size.value], function(result){ icon.source = result }) }) @@ -62,10 +62,30 @@ Page { height: width } - Button { + Slider { + id: size anchors.top: icon.bottom anchors.horizontalCenter: parent.horizontalCenter anchors.topMargin: 10 + label: "Size:" + width: parent.width + minimumValue: 0 + maximumValue: 100 + stepSize: 10 + value: 100 + onReleased: { + py.importModule("main", function(){ + py.call("main.sailify", [(iconEditor.attrs.old_icon || iconEditor.attrs.Icon).toString(), iconEditor.corners, size.value], function(result){ + icon.source = result + }) + }) + } + } + + Button { + anchors.top: size.bottom + anchors.horizontalCenter: parent.horizontalCenter + anchors.topMargin: 20 text: "Save" onClicked: { if(iconEditor.attrs.old_icon === undefined) { @@ -89,7 +109,7 @@ Page { Component.onCompleted: { py.addImportPath(Qt.resolvedUrl("../src")); py.importModule("main", function(){ - py.call("main.sailify", [(iconEditor.attrs.old_icon || iconEditor.attrs.Icon).toString(), [1, 1, 1, 1]], function(result){ + py.call("main.sailify", [(iconEditor.attrs.old_icon || iconEditor.attrs.Icon).toString(), [1, 1, 1, 1], size.value], function(result){ icon.source = result }) })