forked from Shinonome/dots-hyprland
adjust notif action button position
This commit is contained in:
@@ -218,6 +218,26 @@ Item { // Notification item area
|
|||||||
id: actionRowLayout
|
id: actionRowLayout
|
||||||
Layout.alignment: Qt.AlignBottom
|
Layout.alignment: Qt.AlignBottom
|
||||||
|
|
||||||
|
NotificationActionButton {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
buttonText: qsTr("Close")
|
||||||
|
urgency: notificationObject.urgency
|
||||||
|
implicitWidth: (notificationObject.actions.length == 0) ? ((actionsFlickable.width - actionRowLayout.spacing) / 2) :
|
||||||
|
(contentItem.implicitWidth + leftPadding + rightPadding)
|
||||||
|
|
||||||
|
onClicked: {
|
||||||
|
root.destroyWithAnimation()
|
||||||
|
}
|
||||||
|
|
||||||
|
contentItem: MaterialSymbol {
|
||||||
|
iconSize: Appearance.font.pixelSize.large
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
color: (notificationObject.urgency == NotificationUrgency.Critical) ?
|
||||||
|
Appearance.m3colors.m3onSurfaceVariant : Appearance.m3colors.m3onSurface
|
||||||
|
text: "close"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Repeater {
|
Repeater {
|
||||||
id: actionRepeater
|
id: actionRepeater
|
||||||
model: notificationObject.actions
|
model: notificationObject.actions
|
||||||
@@ -262,26 +282,6 @@ Item { // Notification item area
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
NotificationActionButton {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
buttonText: qsTr("Close")
|
|
||||||
urgency: notificationObject.urgency
|
|
||||||
implicitWidth: (notificationObject.actions.length == 0) ? ((actionsFlickable.width - actionRowLayout.spacing) / 2) :
|
|
||||||
(contentItem.implicitWidth + leftPadding + rightPadding)
|
|
||||||
|
|
||||||
onClicked: {
|
|
||||||
root.destroyWithAnimation()
|
|
||||||
}
|
|
||||||
|
|
||||||
contentItem: MaterialSymbol {
|
|
||||||
iconSize: Appearance.font.pixelSize.large
|
|
||||||
horizontalAlignment: Text.AlignHCenter
|
|
||||||
color: (notificationObject.urgency == NotificationUrgency.Critical) ?
|
|
||||||
Appearance.m3colors.m3onSurfaceVariant : Appearance.m3colors.m3onSurface
|
|
||||||
text: "close"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user