forked from Shinonome/dots-hyprland
region selector: add option to show/hide coord aim lines
This commit is contained in:
@@ -362,9 +362,12 @@ Singleton {
|
|||||||
property real opacity: 0.3
|
property real opacity: 0.3
|
||||||
property real contentRegionOpacity: 0.8
|
property real contentRegionOpacity: 0.8
|
||||||
}
|
}
|
||||||
|
property JsonObject rect: JsonObject {
|
||||||
|
property bool showAimLines: true
|
||||||
|
}
|
||||||
property JsonObject circle: JsonObject {
|
property JsonObject circle: JsonObject {
|
||||||
property int strokeWidth: 6
|
property int strokeWidth: 6
|
||||||
property int padding: 40
|
property int padding: 30
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import qs.modules.common
|
||||||
import qs.modules.common.widgets
|
import qs.modules.common.widgets
|
||||||
import QtQuick
|
import QtQuick
|
||||||
|
|
||||||
@@ -11,6 +12,7 @@ Item {
|
|||||||
required property real mouseY
|
required property real mouseY
|
||||||
required property color color
|
required property color color
|
||||||
required property color overlayColor
|
required property color overlayColor
|
||||||
|
property bool showAimLines: Config.options.regionSelector.rect.showAimLines
|
||||||
|
|
||||||
// Overlay to darken screen
|
// Overlay to darken screen
|
||||||
// Base dark overlay around region
|
// Base dark overlay around region
|
||||||
@@ -62,6 +64,8 @@ Item {
|
|||||||
|
|
||||||
// Coord lines
|
// Coord lines
|
||||||
Rectangle { // Vertical
|
Rectangle { // Vertical
|
||||||
|
visible: root.showAimLines
|
||||||
|
opacity: 0.5
|
||||||
z: 2
|
z: 2
|
||||||
x: root.mouseX
|
x: root.mouseX
|
||||||
anchors {
|
anchors {
|
||||||
@@ -72,6 +76,8 @@ Item {
|
|||||||
color: root.color
|
color: root.color
|
||||||
}
|
}
|
||||||
Rectangle { // Horizontal
|
Rectangle { // Horizontal
|
||||||
|
visible: root.showAimLines
|
||||||
|
opacity: 0.5
|
||||||
z: 2
|
z: 2
|
||||||
y: root.mouseY
|
y: root.mouseY
|
||||||
anchors {
|
anchors {
|
||||||
|
|||||||
@@ -626,6 +626,19 @@ ContentPage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ContentSubsection {
|
||||||
|
title: Translation.tr("Rectangular selection")
|
||||||
|
|
||||||
|
ConfigSwitch {
|
||||||
|
buttonIcon: "point_scan"
|
||||||
|
text: Translation.tr("Show aim lines")
|
||||||
|
checked: Config.options.regionSelector.rect.showAimLines
|
||||||
|
onCheckedChanged: {
|
||||||
|
Config.options.regionSelector.rect.showAimLines = checked;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ContentSubsection {
|
ContentSubsection {
|
||||||
title: Translation.tr("Circle selection")
|
title: Translation.tr("Circle selection")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user