1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-04-04 12:52:06 -04:00

notifications: fix kb navigation breaking on history tab close

This commit is contained in:
bbedward
2026-02-07 17:42:20 -05:00
parent 8ee7fe8e66
commit 4557426c28
5 changed files with 27 additions and 15 deletions

View File

@@ -34,7 +34,9 @@ Rectangle {
property bool __initialized: false
Component.onCompleted: {
Qt.callLater(() => { __initialized = true; });
Qt.callLater(() => {
__initialized = true;
});
}
Behavior on border.color {
@@ -353,7 +355,9 @@ Rectangle {
property bool __delegateInitialized: false
Component.onCompleted: {
Qt.callLater(() => { __delegateInitialized = true; });
Qt.callLater(() => {
__delegateInitialized = true;
});
}
width: parent.width
@@ -530,13 +534,13 @@ Rectangle {
Rectangle {
property bool isHovered: false
width: Math.max(actionText.implicitWidth + Theme.spacingM, compactMode ? 40 : 50)
width: Math.max(expandedActionText.implicitWidth + Theme.spacingM, compactMode ? 40 : 50)
height: actionButtonHeight
radius: Theme.spacingXS
color: isHovered ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.1) : "transparent"
StyledText {
id: actionText
id: expandedActionText
text: {
const baseText = modelData.text || "View";
if (keyboardNavigationActive && (isGroupSelected || selectedNotificationIndex >= 0))
@@ -567,13 +571,13 @@ Rectangle {
Rectangle {
property bool isHovered: false
width: Math.max(clearText.implicitWidth + Theme.spacingM, compactMode ? 40 : 50)
width: Math.max(expandedClearText.implicitWidth + Theme.spacingM, compactMode ? 40 : 50)
height: actionButtonHeight
radius: Theme.spacingXS
color: isHovered ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.1) : "transparent"
StyledText {
id: clearText
id: expandedClearText
text: I18n.tr("Dismiss")
color: parent.isHovered ? Theme.primary : Theme.surfaceVariantText
font.pixelSize: Theme.fontSizeSmall
@@ -613,13 +617,13 @@ Rectangle {
Rectangle {
property bool isHovered: false
width: Math.max(actionText.implicitWidth + Theme.spacingM, compactMode ? 40 : 50)
width: Math.max(collapsedActionText.implicitWidth + Theme.spacingM, compactMode ? 40 : 50)
height: actionButtonHeight
radius: Theme.spacingXS
color: isHovered ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.1) : "transparent"
StyledText {
id: actionText
id: collapsedActionText
text: {
const baseText = modelData.text || "View";
if (keyboardNavigationActive && isGroupSelected) {
@@ -661,13 +665,13 @@ Rectangle {
anchors.rightMargin: Theme.spacingL
anchors.top: collapsedContent.bottom
anchors.topMargin: contentSpacing
width: Math.max(clearText.implicitWidth + Theme.spacingM, compactMode ? 40 : 50)
width: Math.max(collapsedClearText.implicitWidth + Theme.spacingM, compactMode ? 40 : 50)
height: actionButtonHeight
radius: Theme.spacingXS
color: isHovered ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.1) : "transparent"
StyledText {
id: clearText
id: collapsedClearText
text: I18n.tr("Dismiss")
color: clearButton.isHovered ? Theme.primary : Theme.surfaceVariantText
font.pixelSize: Theme.fontSizeSmall