Files
sloposk/qml/ResizeHandle.qml
ericek111andClaude Opus 5.5 23e957660f Reword code comments in plain technical language
Comments only, no code changes. Replaces vague or personified phrasing
with explicit statements of what the code does and why, uses bullet
lists for multi-case behavior, and fixes the settings path in
WindowSettings.h (~/.config/sloposk/sloposk.conf).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 19:58:59 +01:00

37 lines
978 B
QML

import QtQuick
// Corner grip. Only emits dragStarted(); the parent starts the window manager's resize.
Item {
id: grip
signal dragStarted()
implicitWidth: 28
implicitHeight: 28
// Two strokes across the corner, each from (w - d, h) to (w, h - d).
Repeater {
model: [9, 16]
Rectangle {
required property real modelData
readonly property real inset: 4
width: modelData * Math.SQRT2
height: 2
radius: 1
color: Theme.handle
rotation: -45
x: grip.width - inset - modelData / 2 - width / 2
y: grip.height - inset - modelData / 2 - height / 2
}
}
DragHandler {
target: null
// Prevent the grab bar underneath from taking over the drag.
grabPermissions: PointerHandler.TakeOverForbidden
cursorShape: Qt.SizeFDiagCursor
onActiveChanged: if (active) grip.dragStarted()
}
}