mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2025-12-07 22:15:38 -05:00
Notepad top layer & remove background click to close
This commit is contained in:
@@ -64,22 +64,9 @@ PanelWindow {
|
||||
|
||||
color: "transparent"
|
||||
|
||||
WlrLayershell.layer: WlrLayershell.Overlay
|
||||
WlrLayershell.layer: WlrLayershell.Top
|
||||
WlrLayershell.exclusiveZone: 0
|
||||
WlrLayershell.keyboardFocus: isVisible ? WlrKeyboardFocus.OnDemand : WlrKeyboardFocus.None
|
||||
|
||||
|
||||
// Background click to close
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
enabled: isVisible
|
||||
onClicked: mouse => {
|
||||
var localPos = mapToItem(contentRect, mouse.x, mouse.y)
|
||||
if (localPos.x < 0 || localPos.x > contentRect.width || localPos.y < 0 || localPos.y > contentRect.height) {
|
||||
hide()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
StyledRect {
|
||||
id: contentRect
|
||||
|
||||
Reference in New Issue
Block a user