fix NotifCenter: switch from deleted PopupPanel to HoverPanel
This commit is contained in:
parent
71258b6d80
commit
585297ea2d
1 changed files with 9 additions and 8 deletions
|
|
@ -2,14 +2,15 @@ import QtQuick
|
||||||
import Quickshell.Services.Notifications
|
import Quickshell.Services.Notifications
|
||||||
import "." as M
|
import "." as M
|
||||||
|
|
||||||
M.PopupPanel {
|
M.HoverPanel {
|
||||||
id: menuWindow
|
id: menuWindow
|
||||||
|
|
||||||
panelWidth: 350
|
popupMode: true
|
||||||
|
contentWidth: 350
|
||||||
|
|
||||||
// Header: title + clear all + DND toggle
|
// Header: title + clear all + DND toggle
|
||||||
Item {
|
Item {
|
||||||
width: menuWindow.panelWidth
|
width: menuWindow.contentWidth
|
||||||
height: 32
|
height: 32
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
|
|
@ -133,7 +134,7 @@ M.PopupPanel {
|
||||||
|
|
||||||
// Separator
|
// Separator
|
||||||
Rectangle {
|
Rectangle {
|
||||||
width: menuWindow.panelWidth - 16
|
width: menuWindow.contentWidth - 16
|
||||||
height: 1
|
height: 1
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
color: M.Theme.base03
|
color: M.Theme.base03
|
||||||
|
|
@ -142,7 +143,7 @@ M.PopupPanel {
|
||||||
// Notification list (scrollable)
|
// Notification list (scrollable)
|
||||||
ListView {
|
ListView {
|
||||||
id: notifList
|
id: notifList
|
||||||
width: menuWindow.panelWidth
|
width: menuWindow.contentWidth
|
||||||
height: Math.min(contentHeight, 60 * (M.Modules.notifications.maxVisible || 10))
|
height: Math.min(contentHeight, 60 * (M.Modules.notifications.maxVisible || 10))
|
||||||
clip: true
|
clip: true
|
||||||
boundsBehavior: Flickable.StopAtBounds
|
boundsBehavior: Flickable.StopAtBounds
|
||||||
|
|
@ -153,7 +154,7 @@ M.PopupPanel {
|
||||||
required property var modelData
|
required property var modelData
|
||||||
required property int index
|
required property int index
|
||||||
|
|
||||||
width: menuWindow.panelWidth
|
width: menuWindow.contentWidth
|
||||||
height: _targetHeight * _heightScale
|
height: _targetHeight * _heightScale
|
||||||
opacity: 0
|
opacity: 0
|
||||||
clip: true
|
clip: true
|
||||||
|
|
@ -370,7 +371,7 @@ M.PopupPanel {
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
target: notifItem
|
target: notifItem
|
||||||
property: "x"
|
property: "x"
|
||||||
to: menuWindow.panelWidth
|
to: menuWindow.contentWidth
|
||||||
duration: 200
|
duration: 200
|
||||||
easing.type: Easing.InCubic
|
easing.type: Easing.InCubic
|
||||||
}
|
}
|
||||||
|
|
@ -411,7 +412,7 @@ M.PopupPanel {
|
||||||
// Empty state
|
// Empty state
|
||||||
Text {
|
Text {
|
||||||
visible: M.NotifService.count === 0
|
visible: M.NotifService.count === 0
|
||||||
width: menuWindow.panelWidth
|
width: menuWindow.contentWidth
|
||||||
height: 48
|
height: 48
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue