diff --git a/src/declarativeimports/plasmastyle/CursorDelegate.qml b/src/declarativeimports/plasmastyle/CursorDelegate.qml index 3b335a018..07a817589 100644 --- a/src/declarativeimports/plasmastyle/CursorDelegate.qml +++ b/src/declarativeimports/plasmastyle/CursorDelegate.qml @@ -1,5 +1,5 @@ /* -* Copyright (C) 2015 by Marco MArtin +* Copyright (C) 2015 by Marco Martin * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as diff --git a/src/declarativeimports/plasmastyle/EditMenuTouch.qml b/src/declarativeimports/plasmastyle/EditMenuTouch.qml index d3208e870..4c818ffc5 100644 --- a/src/declarativeimports/plasmastyle/EditMenuTouch.qml +++ b/src/declarativeimports/plasmastyle/EditMenuTouch.qml @@ -36,9 +36,12 @@ Item { z: 9999 Component.onCompleted: { var par = control - while (par.parent) { + //heuristic: if a flickable is found in the parents, + //reparent to it, so it scrolls together + while (par.parent && par.parent.contentY === undefined) { par = par.parent } + popup.parent = par } @@ -46,11 +49,9 @@ Item { popup.x = pos.x; popup.y = pos.y; popup.visible = true; - popup.z = 9999 } function dismiss() { popup.visible = false; - input.z = 0 } Row { x: parent.margins.left @@ -59,18 +60,18 @@ Item { PlasmaComponents.ToolButton { iconSource: "edit-cut" flat: false - enabled: input.selectedText != "" + visible: input.selectedText != "" onClicked: { - cut(); + control.cut(); select(input.cursorPosition, input.cursorPosition); } } PlasmaComponents.ToolButton { iconSource: "edit-copy" - enabled: input.selectedText != "" + visible: input.selectedText != "" flat: false onClicked: { - copy(); + control.copy(); select(input.cursorPosition, input.cursorPosition); } } @@ -79,7 +80,7 @@ Item { enabled: input.canPaste flat: false onClicked: { - paste(); + control.paste(); } } }