1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-08 06:25:37 -05:00

DankActionButton notification center header buttons

This commit is contained in:
bbedward
2025-08-13 19:11:40 -04:00
parent 5a772505b1
commit eb666477b9

View File

@@ -77,66 +77,29 @@ Item {
spacing: Theme.spacingXS spacing: Theme.spacingXS
// Settings button // Settings button
Rectangle { DankActionButton {
id: settingsButton id: settingsButton
iconName: "settings"
width: 28 iconColor: root.showSettings ? Theme.primary : Theme.surfaceText
height: 28 buttonSize: 28
radius: Theme.cornerRadius anchors.verticalCenter: parent.verticalCenter
color: settingsArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g,
Theme.primary.b, 0.12) : (root.showSettings ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.2) : "transparent")
border.color: settingsArea.containsMouse ? Theme.primary : Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.08)
border.width: 1
DankIcon {
name: "settings"
size: 16
color: settingsArea.containsMouse ? Theme.primary : Theme.surfaceText
anchors.centerIn: parent
}
MouseArea {
id: settingsArea
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: root.showSettings = !root.showSettings onClicked: root.showSettings = !root.showSettings
} }
}
// Keyboard help button // Keyboard help button
Rectangle { DankActionButton {
id: helpButton id: helpButton
iconName: "help"
width: 28 iconColor: keyboardController && keyboardController.showKeyboardHints ? Theme.primary : Theme.surfaceText
height: 28 buttonSize: 28
radius: Theme.cornerRadius
visible: keyboardController !== null visible: keyboardController !== null
color: helpArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, anchors.verticalCenter: parent.verticalCenter
Theme.primary.b, 0.12) : (keyboardController && keyboardController.showKeyboardHints ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.2) : "transparent")
border.color: helpArea.containsMouse ? Theme.primary : Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.08)
border.width: 1
StyledText {
text: "?"
font.pixelSize: Theme.fontSizeMedium
font.weight: Font.Bold
color: helpArea.containsMouse ? Theme.primary : Theme.surfaceText
anchors.centerIn: parent
}
MouseArea {
id: helpArea
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: { onClicked: {
if (keyboardController) { if (keyboardController) {
keyboardController.showKeyboardHints = !keyboardController.showKeyboardHints keyboardController.showKeyboardHints = !keyboardController.showKeyboardHints
} }
} }
} }
}
Rectangle { Rectangle {
id: clearAllButton id: clearAllButton