Changeset View
Changeset View
Standalone View
Standalone View
src/declarativeimports/plasmacomponents3/TextField.qml
Show First 20 Lines • Show All 64 Lines • ▼ Show 20 Line(s) | 29 | T.TextField { | |||
---|---|---|---|---|---|
65 | onPressAndHold: { | 65 | onPressAndHold: { | ||
66 | if (!Kirigami.Settings.tabletMode) { | 66 | if (!Kirigami.Settings.tabletMode) { | ||
67 | return; | 67 | return; | ||
68 | } | 68 | } | ||
69 | forceActiveFocus(); | 69 | forceActiveFocus(); | ||
70 | cursorPosition = positionAt(event.x, event.y); | 70 | cursorPosition = positionAt(event.x, event.y); | ||
71 | selectWord(); | 71 | selectWord(); | ||
72 | } | 72 | } | ||
73 | Private.MobileCursor { | 73 | MobileTextSelection.MobileCursor { | ||
74 | target: control | 74 | target: control | ||
75 | selectionStartHandle: true | 75 | selectionStartHandle: true | ||
76 | property var rect: target.positionToRectangle(target.selectionStart) | 76 | property var rect: target.positionToRectangle(target.selectionStart) | ||
77 | //FIXME: this magic values seem to be always valid, for every font,every dpi, every scaling | 77 | //FIXME: this magic values seem to be always valid, for every font,every dpi, every scaling | ||
78 | x: rect.x + 5 | 78 | x: rect.x + 5 | ||
79 | y: rect.y + 6 | 79 | y: rect.y + 6 | ||
80 | } | 80 | } | ||
81 | 81 | | |||
Show All 30 Lines |