forked from Shinonome/dots-hyprland
region selector: add selection padding to target regions
This commit is contained in:
@@ -377,6 +377,7 @@ Singleton {
|
|||||||
property bool showLabel: false
|
property bool showLabel: false
|
||||||
property real opacity: 0.3
|
property real opacity: 0.3
|
||||||
property real contentRegionOpacity: 0.8
|
property real contentRegionOpacity: 0.8
|
||||||
|
property int selectionPadding: 5
|
||||||
}
|
}
|
||||||
property JsonObject rect: JsonObject {
|
property JsonObject rect: JsonObject {
|
||||||
property bool showAimLines: true
|
property bool showAimLines: true
|
||||||
|
|||||||
@@ -121,10 +121,11 @@ PanelWindow {
|
|||||||
return (root.targetedRegionX >= 0 && root.targetedRegionY >= 0)
|
return (root.targetedRegionX >= 0 && root.targetedRegionY >= 0)
|
||||||
}
|
}
|
||||||
function setRegionToTargeted() {
|
function setRegionToTargeted() {
|
||||||
root.regionX = root.targetedRegionX;
|
const padding = Config.options.regionSelector.targetRegions.selectionPadding; // Make borders not cut off n stuff
|
||||||
root.regionY = root.targetedRegionY;
|
root.regionX = root.targetedRegionX - padding;
|
||||||
root.regionWidth = root.targetedRegionWidth;
|
root.regionY = root.targetedRegionY - padding;
|
||||||
root.regionHeight = root.targetedRegionHeight;
|
root.regionWidth = root.targetedRegionWidth + padding * 2;
|
||||||
|
root.regionHeight = root.targetedRegionHeight + padding * 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateTargetedRegion(x, y) {
|
function updateTargetedRegion(x, y) {
|
||||||
|
|||||||
Reference in New Issue
Block a user