Files
sloposk/qml/DragHandle.qml
T
ericek111andClaude Opus 5.5 be14bbcc62 Layouts, iPad-style rendering, taps, shift and layers
- JSON layouts (en-US, sv-SE inheriting number/symbol layers via base)
- LayoutModel + KeyGeometry: proportional rows, nearest-key hit testing
- KeyboardSurface: multi-pointer touch/mouse routing to the controller
- KeyboardController + ShiftState: iOS shift/caps-lock, layers, globe, dismiss
- QML view with light/dark iPad palette and drag handle
- DevHooks: SLOPOSK_AUTOTYPE, SLOPOSK_SCREENSHOT for headless checks
- Unit tests for shift, loader, geometry and controller

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 14:50:21 +02:00

31 lines
799 B
QML

import QtQuick
// The grab bar under the floating keyboard. Emits how far it was dragged;
// moving the window is up to the owner.
Item {
id: handle
signal moved(real dx, real dy)
implicitHeight: 22
Rectangle {
anchors.centerIn: parent
width: 120
height: 5
radius: height / 2
color: Theme.handle
}
DragHandler {
target: null
// The window follows the pointer, so the pointer stays near its press
// position in window coordinates: measure each step from there.
onCentroidChanged: {
if (active)
handle.moved(centroid.scenePosition.x - centroid.scenePressPosition.x,
centroid.scenePosition.y - centroid.scenePressPosition.y)
}
}
}