Commit 7a078972 authored by Fushan Wen's avatar Fushan Wen 💬
Browse files

desktoppackage: move position change code to a function

parent e685710c
......@@ -130,6 +130,13 @@ PlasmaCore.SvgItem {
if (!drag.active) {
return;
}
changePosition();
}
onDoubleClicked: {
root.value = root.defaultPosition();
}
function changePosition() {
if (dialogRoot.vertical) {
if (root.alignment === Qt.AlignRight) {
root.value = root.parent.height - (root.y + offset + root.height/2)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment