Move notification button to UserInfo

Move notifications button to a more appropriate position next to username. It used to live in the room/spaces bar, which doesn't make sense context wise. Also the mobile view moves to a bottom navbar anyway.

This is just a copy-paste of the adjacent settings tool button with appropriate icon and callback.
This commit is contained in:
Darshan Phaldesai
2026-02-11 13:56:04 +00:00
committed by Joshua Goins
parent 18d7d2f736
commit a9b4a900c9
2 changed files with 17 additions and 36 deletions

View File

@@ -24,10 +24,6 @@ QQC2.Control {
topPadding: 0
bottomPadding: 0
onActiveFocusChanged: if (activeFocus) {
notificationsButton.forceActiveFocus();
}
contentItem: ColumnLayout {
spacing: 0
@@ -49,38 +45,6 @@ QQC2.Control {
width: scrollView.width
spacing: 0
AvatarTabButton {
id: notificationsButton
Layout.fillWidth: true
Layout.preferredHeight: width - Kirigami.Units.smallSpacing
Layout.maximumHeight: width - Kirigami.Units.smallSpacing
Layout.topMargin: Kirigami.Units.smallSpacing / 2
Layout.bottomMargin: Kirigami.Units.smallSpacing / 2
text: i18n("View notifications")
contentItem: Kirigami.Icon {
source: "notifications"
}
visible: !Kirigami.Settings.isMobile // Shows up in the mobile bar instead
activeFocusOnTab: true
onSelected: (root.Kirigami.PageStack.pageStack as Kirigami.PageRow).pushDialogLayer(Qt.createComponent('org.kde.neochat', 'NotificationsView'), {
connection: root.connection
}, {
title: i18nc("@title", "Notifications"),
modality: Qt.NonModal
})
}
Kirigami.Separator {
visible: notificationsButton.visible
Layout.fillWidth: true
Layout.leftMargin: Kirigami.Units.smallSpacing
Layout.rightMargin: Kirigami.Units.smallSpacing
}
AvatarTabButton {
id: allRoomButton

View File

@@ -89,6 +89,23 @@ RowLayout {
window: QQC2.ApplicationWindow.window as Kirigami.ApplicationWindow
}
}
QQC2.ToolButton {
display: QQC2.Button.IconOnly
text: i18n("View notifications")
icon.name: "notifications"
onClicked: (Kirigami.PageStack.pageStack as Kirigami.PageRow).pushDialogLayer(Qt.createComponent('org.kde.neochat', 'NotificationsView'), {
connection: root.connection
}, {
title: i18nc("@title", "Notifications"),
modality: Qt.NonModal
})
QQC2.ToolTip.text: text
QQC2.ToolTip.visible: hovered
QQC2.ToolTip.delay: Kirigami.Units.toolTipDelay
}
QQC2.ToolButton {
display: QQC2.Button.IconOnly
text: i18nc("@action:button", "Open Settings")