select rectangle

This commit is contained in:
Zacharias-Brohn
2026-03-21 15:50:34 +01:00
parent 8cc2b14ad1
commit ec49904bac
+5 -4
View File
@@ -87,6 +87,7 @@ Item {
} }
border.color: DynamicColors.palette.m3primary border.color: DynamicColors.palette.m3primary
border.pixelAligned: true
border.width: 1 border.width: 1
color: DynamicColors.tPalette.m3primary color: DynamicColors.tPalette.m3primary
opacity: 0 opacity: 0
@@ -127,10 +128,10 @@ Item {
onPositionChanged: mouse => { onPositionChanged: mouse => {
if (lasso.visible) { if (lasso.visible) {
lasso.x = Math.floor(Math.min(mouse.x, root.startX)); lasso.x = Math.min(mouse.x, root.startX);
lasso.y = Math.floor(Math.min(mouse.y, root.startY)); lasso.y = Math.min(mouse.y, root.startY);
lasso.width = Math.floor(Math.abs(mouse.x - root.startX)); lasso.width = Math.abs(mouse.x - root.startX);
lasso.height = Math.floor(Math.abs(mouse.y - root.startY)); lasso.height = Math.abs(mouse.y - root.startY);
let minCol = Math.floor((lasso.x - gridArea.x) / cellWidth); let minCol = Math.floor((lasso.x - gridArea.x) / cellWidth);
let maxCol = Math.floor((lasso.x + lasso.width - gridArea.x) / cellWidth); let maxCol = Math.floor((lasso.x + lasso.width - gridArea.x) / cellWidth);