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,12 +319,20 @@ 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
cursorShape: Qt.PointingHandCursor
hoverEnabled: true
onEntered: {
parent.font.underline = true
}
onExited: {
parent.font.underline = false
}
onClicked: { onClicked: {
appSettings.notificationSetting = defaultAppSettings.notificationSetting appSettings.notificationSetting = defaultAppSettings.notificationSetting
appSettings.notificationSoundsEnabled = defaultAppSettings.notificationSoundsEnabled appSettings.notificationSoundsEnabled = defaultAppSettings.notificationSoundsEnabled
@ -332,6 +340,7 @@ ScrollView {
appSettings.allowNotificationsFromNonContacts = defaultAppSettings.allowNotificationsFromNonContacts appSettings.allowNotificationsFromNonContacts = defaultAppSettings.allowNotificationsFromNonContacts
} }
} }
}
StyledText { StyledText {
//% "Restore default notification settings and unmute all chats and users" //% "Restore default notification settings and unmute all chats and users"