Move notificationswapper to common, change defaul wrap mode

This commit is contained in:
2025-10-10 20:24:51 -03:00
parent 92a3907b8f
commit f69518aec4
5 changed files with 90 additions and 69 deletions

View File

@@ -8,12 +8,18 @@ import qs.Services
import qs.Widgets
import qs.Common.Styled
import qs.Common
import QtQuick.Window
import Quickshell.Wayland
PopupWindow {
PanelWindow {
id: notificationRoot
anchor.item: root
anchors {
left: true
bottom: true
right: true
top: true
}
implicitWidth: screen.width
// implicitWidth: 400
implicitHeight: screen.height
@@ -21,6 +27,14 @@ PopupWindow {
visible: true
signal clear
WlrLayershell.keyboardFocus: WlrKeyboardFocus.OnDemand
contentItem {
focus: true
Keys.onPressed: event => {
if (event.key == Qt.Key_Escape) notificationRoot.clear();
}
}
MouseArea {
anchors.fill: parent
onClicked: notificationRoot.clear()
@@ -32,7 +46,6 @@ PopupWindow {
anchors{
top: parent.top
left: parent.left
topMargin: 40
}
border.width: 1
color: Theme.color2
@@ -60,7 +73,7 @@ PopupWindow {
}
}
StyledText {
anchors.centerIn: parent
anchors.fill: parent
text: "NOTIFICAÇÕES"
}
}