overlay: hide some unnecessary buttons

This commit is contained in:
end-4
2025-11-07 21:10:21 +01:00
parent 87181585aa
commit 1cc04e118f
2 changed files with 10 additions and 1 deletions
@@ -22,6 +22,8 @@ AbstractOverlayWidget {
required property Item contentItem
property bool fancyBorders: true
property bool showCenterButton: false
property bool showClickabilityButton: true
required property var modelData
readonly property string identifier: modelData.identifier
@@ -144,7 +146,7 @@ AbstractOverlayWidget {
leftMargin: titleBar.padding + 8
bottomMargin: root.fancyBorders ? 0 : titleBar.padding
}
spacing: 0
spacing: 2
MaterialSymbol {
text: root.materialSymbol
@@ -160,6 +162,7 @@ AbstractOverlayWidget {
}
TitlebarButton {
visible: root.showCenterButton
materialSymbol: "recenter"
onClicked: root.center()
StyledToolTip {
@@ -168,6 +171,7 @@ AbstractOverlayWidget {
}
TitlebarButton {
visible: (root.pinned && root.showClickabilityButton)
materialSymbol: "mouse"
toggled: !root.clickthrough
onClicked: root.toggleClickthrough()
@@ -7,6 +7,11 @@ import qs.modules.overlay
StyledOverlayWidget {
id: root
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 {
anchors.centerIn: parent
}