mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-04 04:42:05 -04:00
notifications: fix kb navigation breaking on history tab close
This commit is contained in:
@@ -23,6 +23,7 @@ DankModal {
|
||||
|
||||
function show() {
|
||||
notificationModalOpen = true;
|
||||
currentTab = 0;
|
||||
NotificationService.onOverlayOpen();
|
||||
open();
|
||||
modalKeyboardController.reset();
|
||||
|
||||
@@ -14,7 +14,9 @@ Rectangle {
|
||||
property bool __initialized: false
|
||||
|
||||
Component.onCompleted: {
|
||||
Qt.callLater(() => { __initialized = true; });
|
||||
Qt.callLater(() => {
|
||||
__initialized = true;
|
||||
});
|
||||
}
|
||||
|
||||
readonly property bool compactMode: SettingsData.notificationCompactMode
|
||||
|
||||
@@ -256,7 +256,9 @@ Item {
|
||||
property bool __delegateInitialized: false
|
||||
|
||||
Component.onCompleted: {
|
||||
Qt.callLater(() => { __delegateInitialized = true; });
|
||||
Qt.callLater(() => {
|
||||
__delegateInitialized = true;
|
||||
});
|
||||
}
|
||||
|
||||
width: ListView.view.width
|
||||
|
||||
@@ -10,13 +10,14 @@ DankListView {
|
||||
property bool keyboardActive: false
|
||||
property bool autoScrollDisabled: false
|
||||
property bool isAnimatingExpansion: false
|
||||
property alias count: listView.count
|
||||
property alias listContentHeight: listView.contentHeight
|
||||
property bool cardAnimateExpansion: true
|
||||
property bool listInitialized: false
|
||||
|
||||
Component.onCompleted: {
|
||||
Qt.callLater(() => { listInitialized = true; });
|
||||
Qt.callLater(() => {
|
||||
listInitialized = true;
|
||||
});
|
||||
}
|
||||
|
||||
clip: true
|
||||
@@ -86,7 +87,9 @@ DankListView {
|
||||
property bool __delegateInitialized: false
|
||||
|
||||
Component.onCompleted: {
|
||||
Qt.callLater(() => { __delegateInitialized = true; });
|
||||
Qt.callLater(() => {
|
||||
__delegateInitialized = true;
|
||||
});
|
||||
}
|
||||
|
||||
width: ListView.view.width
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user