refactor: make screenshots even less bad, and copy to the clipboard

This commit is contained in:
kossLAN 2025-10-15 15:12:42 -04:00
parent 62ed66e60a
commit 29658fa910
Signed by: kossLAN
SSH key fingerprint: SHA256:bdV0x+wdQHGJ6LgmstH3KV8OpWY+OOFmJcPcB0wQPV8
4 changed files with 52 additions and 7 deletions

View file

@ -9,10 +9,17 @@ Item {
property color overlayColor: "#80000000"
property rect selectionRect: Qt.rect(0, 0, 0, 0)
property point startPosition: Qt.point(0, 0)
property real borderSize: 2
signal areaSelected(rect selection)
// only send signal when selection rectangle has finished
onVisibleChanged: areaSelected(selectionRect)
// only send signal when selection rectangle has finished
onVisibleChanged: {
if (!visible)
selectionRect.width -= borderSize;
selectionRect.height -= borderSize;
areaSelected(selectionRect);
}
MouseArea {
id: selectionArea
@ -94,7 +101,7 @@ Item {
id: rectangle
color: "transparent"
border.color: ShellSettings.colors.active_translucent
border.width: 2
border.width: root.borderSize
x: 0
y: 0
width: 0