mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2025-12-07 14:05:38 -05:00
Merge branch 'master' of github.com:bbedward/dank-material-dark-shell
This commit is contained in:
@@ -491,14 +491,14 @@ Rectangle {
|
|||||||
Rectangle {
|
Rectangle {
|
||||||
property bool isHovered: false
|
property bool isHovered: false
|
||||||
|
|
||||||
width: Math.max(dismissText.implicitWidth + 12, 50)
|
width: Math.max(clearText.implicitWidth + 12, 50)
|
||||||
height: 24
|
height: 24
|
||||||
radius: 4
|
radius: 4
|
||||||
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: dismissText
|
id: clearText
|
||||||
text: "Dismiss"
|
text: "Clear"
|
||||||
color: parent.isHovered ? Theme.primary : Theme.surfaceVariantText
|
color: parent.isHovered ? Theme.primary : Theme.surfaceVariantText
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
font.pixelSize: Theme.fontSizeSmall
|
||||||
font.weight: Font.Medium
|
font.weight: Font.Medium
|
||||||
@@ -525,7 +525,7 @@ Rectangle {
|
|||||||
|
|
||||||
Row {
|
Row {
|
||||||
visible: !expanded
|
visible: !expanded
|
||||||
anchors.right: dismissButton.left
|
anchors.right: clearButton.left
|
||||||
anchors.rightMargin: 8
|
anchors.rightMargin: 8
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
anchors.bottomMargin: 8
|
anchors.bottomMargin: 8
|
||||||
@@ -569,7 +569,7 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: dismissButton
|
id: clearButton
|
||||||
|
|
||||||
property bool isHovered: false
|
property bool isHovered: false
|
||||||
|
|
||||||
@@ -578,16 +578,15 @@ Rectangle {
|
|||||||
anchors.rightMargin: 16
|
anchors.rightMargin: 16
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
anchors.bottomMargin: 8
|
anchors.bottomMargin: 8
|
||||||
width: dismissText.width + 16
|
width: clearText.width + 16
|
||||||
height: dismissText.height + 8
|
height: clearText.height + 8
|
||||||
radius: 6
|
radius: 6
|
||||||
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: dismissText
|
id: clearText
|
||||||
|
text: "Clear"
|
||||||
text: "Dismiss"
|
color: clearButton.isHovered ? Theme.primary : Theme.surfaceVariantText
|
||||||
color: dismissButton.isHovered ? Theme.primary : Theme.surfaceVariantText
|
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
font.pixelSize: Theme.fontSizeSmall
|
||||||
font.weight: Font.Medium
|
font.weight: Font.Medium
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
@@ -597,8 +596,8 @@ Rectangle {
|
|||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: Qt.PointingHandCursor
|
||||||
onEntered: dismissButton.isHovered = true
|
onEntered: clearButton.isHovered = true
|
||||||
onExited: dismissButton.isHovered = false
|
onExited: clearButton.isHovered = false
|
||||||
onClicked: NotificationService.dismissGroup(notificationGroup?.key || "")
|
onClicked: NotificationService.dismissGroup(notificationGroup?.key || "")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -286,7 +286,7 @@ PanelWindow {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Row {
|
Row {
|
||||||
anchors.right: dismissButton.left
|
anchors.right: clearButton.left
|
||||||
anchors.rightMargin: 8
|
anchors.rightMargin: 8
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
anchors.bottomMargin: 8
|
anchors.bottomMargin: 8
|
||||||
@@ -335,23 +335,23 @@ PanelWindow {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: dismissButton
|
id: clearButton
|
||||||
property bool isHovered: false
|
property bool isHovered: false
|
||||||
|
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.rightMargin: 16
|
anchors.rightMargin: 16
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
anchors.bottomMargin: 8
|
anchors.bottomMargin: 8
|
||||||
width: Math.max(dismissText.implicitWidth + 12, 50)
|
width: Math.max(clearText.implicitWidth + 12, 50)
|
||||||
height: 24
|
height: 24
|
||||||
radius: 4
|
radius: 4
|
||||||
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"
|
||||||
z: 20
|
z: 20
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
id: dismissText
|
id: clearText
|
||||||
text: "Dismiss"
|
text: "Clear"
|
||||||
color: dismissButton.isHovered ? Theme.primary : Theme.surfaceVariantText
|
color: clearButton.isHovered ? Theme.primary : Theme.surfaceVariantText
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
font.pixelSize: Theme.fontSizeSmall
|
||||||
font.weight: Font.Medium
|
font.weight: Font.Medium
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
@@ -362,8 +362,8 @@ PanelWindow {
|
|||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: Qt.PointingHandCursor
|
||||||
acceptedButtons: Qt.LeftButton
|
acceptedButtons: Qt.LeftButton
|
||||||
onEntered: dismissButton.isHovered = true
|
onEntered: clearButton.isHovered = true
|
||||||
onExited: dismissButton.isHovered = false
|
onExited: clearButton.isHovered = false
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (notificationData && !win.exiting) {
|
if (notificationData && !win.exiting) {
|
||||||
NotificationService.dismissNotification(notificationData);
|
NotificationService.dismissNotification(notificationData);
|
||||||
|
|||||||
Reference in New Issue
Block a user