mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-12 08:42:13 -04:00
notifications: fix kb navigation breaking on history tab close
This commit is contained in:
@@ -23,6 +23,7 @@ DankModal {
|
|||||||
|
|
||||||
function show() {
|
function show() {
|
||||||
notificationModalOpen = true;
|
notificationModalOpen = true;
|
||||||
|
currentTab = 0;
|
||||||
NotificationService.onOverlayOpen();
|
NotificationService.onOverlayOpen();
|
||||||
open();
|
open();
|
||||||
modalKeyboardController.reset();
|
modalKeyboardController.reset();
|
||||||
|
|||||||
@@ -14,7 +14,9 @@ Rectangle {
|
|||||||
property bool __initialized: false
|
property bool __initialized: false
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
Qt.callLater(() => { __initialized = true; });
|
Qt.callLater(() => {
|
||||||
|
__initialized = true;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
readonly property bool compactMode: SettingsData.notificationCompactMode
|
readonly property bool compactMode: SettingsData.notificationCompactMode
|
||||||
|
|||||||
@@ -256,7 +256,9 @@ Item {
|
|||||||
property bool __delegateInitialized: false
|
property bool __delegateInitialized: false
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
Qt.callLater(() => { __delegateInitialized = true; });
|
Qt.callLater(() => {
|
||||||
|
__delegateInitialized = true;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
width: ListView.view.width
|
width: ListView.view.width
|
||||||
|
|||||||
@@ -10,13 +10,14 @@ DankListView {
|
|||||||
property bool keyboardActive: false
|
property bool keyboardActive: false
|
||||||
property bool autoScrollDisabled: false
|
property bool autoScrollDisabled: false
|
||||||
property bool isAnimatingExpansion: false
|
property bool isAnimatingExpansion: false
|
||||||
property alias count: listView.count
|
|
||||||
property alias listContentHeight: listView.contentHeight
|
property alias listContentHeight: listView.contentHeight
|
||||||
property bool cardAnimateExpansion: true
|
property bool cardAnimateExpansion: true
|
||||||
property bool listInitialized: false
|
property bool listInitialized: false
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
Qt.callLater(() => { listInitialized = true; });
|
Qt.callLater(() => {
|
||||||
|
listInitialized = true;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
clip: true
|
clip: true
|
||||||
@@ -86,7 +87,9 @@ DankListView {
|
|||||||
property bool __delegateInitialized: false
|
property bool __delegateInitialized: false
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
Qt.callLater(() => { __delegateInitialized = true; });
|
Qt.callLater(() => {
|
||||||
|
__delegateInitialized = true;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
width: ListView.view.width
|
width: ListView.view.width
|
||||||
|
|||||||
@@ -34,7 +34,9 @@ Rectangle {
|
|||||||
property bool __initialized: false
|
property bool __initialized: false
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
Qt.callLater(() => { __initialized = true; });
|
Qt.callLater(() => {
|
||||||
|
__initialized = true;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
Behavior on border.color {
|
Behavior on border.color {
|
||||||
@@ -353,7 +355,9 @@ Rectangle {
|
|||||||
property bool __delegateInitialized: false
|
property bool __delegateInitialized: false
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
Qt.callLater(() => { __delegateInitialized = true; });
|
Qt.callLater(() => {
|
||||||
|
__delegateInitialized = true;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
width: parent.width
|
width: parent.width
|
||||||
@@ -530,13 +534,13 @@ Rectangle {
|
|||||||
Rectangle {
|
Rectangle {
|
||||||
property bool isHovered: false
|
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
|
height: actionButtonHeight
|
||||||
radius: Theme.spacingXS
|
radius: Theme.spacingXS
|
||||||
color: isHovered ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.1) : "transparent"
|
color: isHovered ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.1) : "transparent"
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
id: actionText
|
id: expandedActionText
|
||||||
text: {
|
text: {
|
||||||
const baseText = modelData.text || "View";
|
const baseText = modelData.text || "View";
|
||||||
if (keyboardNavigationActive && (isGroupSelected || selectedNotificationIndex >= 0))
|
if (keyboardNavigationActive && (isGroupSelected || selectedNotificationIndex >= 0))
|
||||||
@@ -567,13 +571,13 @@ Rectangle {
|
|||||||
Rectangle {
|
Rectangle {
|
||||||
property bool isHovered: false
|
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
|
height: actionButtonHeight
|
||||||
radius: Theme.spacingXS
|
radius: Theme.spacingXS
|
||||||
color: isHovered ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.1) : "transparent"
|
color: isHovered ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.1) : "transparent"
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
id: clearText
|
id: expandedClearText
|
||||||
text: I18n.tr("Dismiss")
|
text: I18n.tr("Dismiss")
|
||||||
color: parent.isHovered ? Theme.primary : Theme.surfaceVariantText
|
color: parent.isHovered ? Theme.primary : Theme.surfaceVariantText
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
font.pixelSize: Theme.fontSizeSmall
|
||||||
@@ -613,13 +617,13 @@ Rectangle {
|
|||||||
Rectangle {
|
Rectangle {
|
||||||
property bool isHovered: false
|
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
|
height: actionButtonHeight
|
||||||
radius: Theme.spacingXS
|
radius: Theme.spacingXS
|
||||||
color: isHovered ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.1) : "transparent"
|
color: isHovered ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.1) : "transparent"
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
id: actionText
|
id: collapsedActionText
|
||||||
text: {
|
text: {
|
||||||
const baseText = modelData.text || "View";
|
const baseText = modelData.text || "View";
|
||||||
if (keyboardNavigationActive && isGroupSelected) {
|
if (keyboardNavigationActive && isGroupSelected) {
|
||||||
@@ -661,13 +665,13 @@ Rectangle {
|
|||||||
anchors.rightMargin: Theme.spacingL
|
anchors.rightMargin: Theme.spacingL
|
||||||
anchors.top: collapsedContent.bottom
|
anchors.top: collapsedContent.bottom
|
||||||
anchors.topMargin: contentSpacing
|
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
|
height: actionButtonHeight
|
||||||
radius: Theme.spacingXS
|
radius: Theme.spacingXS
|
||||||
color: isHovered ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.1) : "transparent"
|
color: isHovered ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.1) : "transparent"
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
id: clearText
|
id: collapsedClearText
|
||||||
text: I18n.tr("Dismiss")
|
text: I18n.tr("Dismiss")
|
||||||
color: clearButton.isHovered ? Theme.primary : Theme.surfaceVariantText
|
color: clearButton.isHovered ? Theme.primary : Theme.surfaceVariantText
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
font.pixelSize: Theme.fontSizeSmall
|
||||||
|
|||||||
Reference in New Issue
Block a user