forked from Shinonome/dots-hyprland
overlay: hide some unnecessary buttons
This commit is contained in:
@@ -22,6 +22,8 @@ AbstractOverlayWidget {
|
|||||||
|
|
||||||
required property Item contentItem
|
required property Item contentItem
|
||||||
property bool fancyBorders: true
|
property bool fancyBorders: true
|
||||||
|
property bool showCenterButton: false
|
||||||
|
property bool showClickabilityButton: true
|
||||||
|
|
||||||
required property var modelData
|
required property var modelData
|
||||||
readonly property string identifier: modelData.identifier
|
readonly property string identifier: modelData.identifier
|
||||||
@@ -144,7 +146,7 @@ AbstractOverlayWidget {
|
|||||||
leftMargin: titleBar.padding + 8
|
leftMargin: titleBar.padding + 8
|
||||||
bottomMargin: root.fancyBorders ? 0 : titleBar.padding
|
bottomMargin: root.fancyBorders ? 0 : titleBar.padding
|
||||||
}
|
}
|
||||||
spacing: 0
|
spacing: 2
|
||||||
|
|
||||||
MaterialSymbol {
|
MaterialSymbol {
|
||||||
text: root.materialSymbol
|
text: root.materialSymbol
|
||||||
@@ -160,6 +162,7 @@ AbstractOverlayWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
TitlebarButton {
|
TitlebarButton {
|
||||||
|
visible: root.showCenterButton
|
||||||
materialSymbol: "recenter"
|
materialSymbol: "recenter"
|
||||||
onClicked: root.center()
|
onClicked: root.center()
|
||||||
StyledToolTip {
|
StyledToolTip {
|
||||||
@@ -168,6 +171,7 @@ AbstractOverlayWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
TitlebarButton {
|
TitlebarButton {
|
||||||
|
visible: (root.pinned && root.showClickabilityButton)
|
||||||
materialSymbol: "mouse"
|
materialSymbol: "mouse"
|
||||||
toggled: !root.clickthrough
|
toggled: !root.clickthrough
|
||||||
onClicked: root.toggleClickthrough()
|
onClicked: root.toggleClickthrough()
|
||||||
|
|||||||
@@ -7,6 +7,11 @@ import qs.modules.overlay
|
|||||||
StyledOverlayWidget {
|
StyledOverlayWidget {
|
||||||
id: root
|
id: root
|
||||||
fancyBorders: false // Crosshair should be see-through
|
fancyBorders: false // Crosshair should be see-through
|
||||||
|
showCenterButton: true
|
||||||
|
opacity: 1 // The crosshair itself already has transparency if configured
|
||||||
|
showClickabilityButton: false
|
||||||
|
clickthrough: true
|
||||||
|
|
||||||
contentItem: CrosshairContent {
|
contentItem: CrosshairContent {
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user