use the mobile menu only conditionally

This commit is contained in:
Marco Martin 2015-07-16 13:52:46 +02:00
parent b88f84e703
commit 9e318ed6d9
3 changed files with 14 additions and 7 deletions

View File

@ -61,14 +61,9 @@ Item {
}
function __popup(pos) {
//pos = input.mapToItem(popup, pos.x, pos.y);
popup.x = pos.x;
popup.y = pos.y;
popup.visible = true;
print("POPUP MENU"+pos.y+" "+popup.x+" "+popup.width+" "+popup.parent)
//popup.y = 0
//popup.parent = input.parent.parent.parent.parent.parent
popup.z = 9999
}
function __dismissMenu() {

View File

@ -20,6 +20,7 @@
import QtQuick 2.1
import QtQuick.Controls.Styles 1.1 as QtQuickControlStyle
import QtQuick.Controls.Private 1.0 as QtQuickControlsPrivate
import QtQuick.Controls 1.1
import org.kde.plasma.core 2.0 as PlasmaCore
@ -67,7 +68,12 @@ QtQuickControlStyle.TextAreaStyle {
incrementControl: svs.incrementControl
decrementControl: svs.decrementControl
Component {
id: editMenuTouch
EditMenuTouch {}
}
__cursorHandle: CursorHandleStyle {}
__selectionHandle: SelectionHandleStyle {}
__editMenu: EditMenuTouch {}
__editMenu: QtQuickControlsPrivate.Settings.isMobile ? editMenuTouch : null
}

View File

@ -19,6 +19,7 @@
import QtQuick 2.0
import QtQuick.Controls.Styles 1.1 as QtQuickControlStyle
import QtQuick.Controls.Private 1.0 as QtQuickControlsPrivate
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 2.0 as PlasmaComponents
@ -66,7 +67,12 @@ QtQuickControlStyle.TextFieldStyle {
}
}
Component {
id: editMenuTouch
EditMenuTouch {}
}
__cursorHandle: CursorHandleStyle {}
__selectionHandle: SelectionHandleStyle {}
__editMenu: EditMenuTouch {}
__editMenu: QtQuickControlsPrivate.Settings.isMobile ? editMenuTouch : null
}