Fix flash before terminal spawns
This commit is contained in:
parent
8364a3b9b9
commit
eeb47e9dc1
4 changed files with 55 additions and 11 deletions
|
|
@ -28,7 +28,7 @@ WlrLayershell {
|
|||
property real endX: 0
|
||||
property real endY: 0
|
||||
|
||||
readonly property bool bigEnough: width > 50 && height > 50
|
||||
readonly property bool bigEnough: width > 300 && height > 150
|
||||
|
||||
border.color: bigEnough ? "#ee33ccff" : "#aa595959"
|
||||
border.width: 1
|
||||
|
|
@ -36,10 +36,10 @@ WlrLayershell {
|
|||
color: "#66001017"
|
||||
visible: selecting
|
||||
|
||||
x: Math.min(startX, endX)
|
||||
y: Math.min(startY, endY)
|
||||
width: Math.max(startX, endX) - x
|
||||
height: Math.max(startY, endY) - y
|
||||
x: Math.min(startX, endX) - border.width
|
||||
y: Math.min(startY, endY) - border.width
|
||||
width: Math.max(startX, endX) - x + border.width * 2
|
||||
height: Math.max(startY, endY) - y + border.width * 2
|
||||
|
||||
function startSelection() {
|
||||
initializing = true
|
||||
|
|
@ -53,11 +53,12 @@ WlrLayershell {
|
|||
|
||||
function endSelection() {
|
||||
const wasSelecting = selecting;
|
||||
selecting = false;
|
||||
initializing = false;
|
||||
|
||||
if (wasSelecting && bigEnough) {
|
||||
selectionComplete(x, y, width, height);
|
||||
selectionComplete(x + 1, y + 1, width - 2, height - 2);
|
||||
} else {
|
||||
selecting = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -80,8 +81,10 @@ WlrLayershell {
|
|||
area.selecting = true;
|
||||
}
|
||||
|
||||
area.endX = mouseX;
|
||||
area.endY = mouseY;
|
||||
if (selectionArea.selecting) {
|
||||
area.endX = mouseX;
|
||||
area.endY = mouseY;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue