refactor(Notifications): turn reset button into link-like element

This is so that it looks and behaves as designed.
This commit is contained in:
Pascal Precht 2021-01-29 11:12:45 +01:00
parent ea2238f998
commit 1b009d634d
No known key found for this signature in database
GPG Key ID: 0EE28D8D6FD85D7D
1 changed files with 20 additions and 11 deletions

View File

@ -319,17 +319,26 @@ ScrollView {
anchors.right: parent.right anchors.right: parent.right
width: parent.width width: parent.width
StatusButton { StyledText {
flat: true text: qsTr("Reset notification settings")
horizontalPadding: 0 font.pixelSize: 15
//% "Reset notification settings" color: Style.current.danger
text: qsTrId("reset-notification-settings") MouseArea {
type: "warn" anchors.fill: parent
onClicked: { cursorShape: Qt.PointingHandCursor
appSettings.notificationSetting = defaultAppSettings.notificationSetting hoverEnabled: true
appSettings.notificationSoundsEnabled = defaultAppSettings.notificationSoundsEnabled onEntered: {
appSettings.notificationMessagePreviewSetting = defaultAppSettings.notificationMessagePreviewSetting parent.font.underline = true
appSettings.allowNotificationsFromNonContacts = defaultAppSettings.allowNotificationsFromNonContacts }
onExited: {
parent.font.underline = false
}
onClicked: {
appSettings.notificationSetting = defaultAppSettings.notificationSetting
appSettings.notificationSoundsEnabled = defaultAppSettings.notificationSoundsEnabled
appSettings.notificationMessagePreviewSetting = defaultAppSettings.notificationMessagePreviewSetting
appSettings.allowNotificationsFromNonContacts = defaultAppSettings.allowNotificationsFromNonContacts
}
} }
} }