Tweaked notification feedback settings UI (#526)
This commit is contained in:
parent
0224d2f338
commit
61e3e366e6
1 changed files with 48 additions and 45 deletions
|
@ -81,7 +81,6 @@ AccordionItem {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
TextSwitch {
|
TextSwitch {
|
||||||
width: parent.columnWidth
|
width: parent.columnWidth
|
||||||
checked: appSettings.useOpenWith
|
checked: appSettings.useOpenWith
|
||||||
|
@ -93,6 +92,17 @@ AccordionItem {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TextSwitch {
|
||||||
|
width: parent.columnWidth
|
||||||
|
checked: appSettings.notificationAlwaysShowPreview
|
||||||
|
text: qsTr("Always append message preview to notifications")
|
||||||
|
description: qsTr("In addition to showing the number of unread messages, the latest message will also be appended to notifications.")
|
||||||
|
automaticCheck: false
|
||||||
|
onClicked: {
|
||||||
|
appSettings.notificationAlwaysShowPreview = !checked
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ComboBox {
|
ComboBox {
|
||||||
id: feedbackComboBox
|
id: feedbackComboBox
|
||||||
width: parent.columnWidth
|
width: parent.columnWidth
|
||||||
|
@ -147,59 +157,52 @@ AccordionItem {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TextSwitch {
|
Item {
|
||||||
width: parent.columnWidth
|
// Occupies one grid cell so that the column ends up under the combo box
|
||||||
checked: appSettings.notificationSuppressContent && enabled
|
// in the landscape layout
|
||||||
text: qsTr("Hide content in Notifications")
|
visible: parent.columns === 2
|
||||||
enabled: appSettings.notificationFeedback !== AppSettings.NotificationFeedbackNone
|
width: 1
|
||||||
clip: height < implicitHeight
|
height: 1
|
||||||
visible: height > 0
|
|
||||||
automaticCheck: false
|
|
||||||
onClicked: {
|
|
||||||
appSettings.notificationSuppressContent = !checked
|
|
||||||
}
|
|
||||||
Behavior on height { SmoothedAnimation { duration: 200 } }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TextSwitch {
|
Column {
|
||||||
width: parent.columnWidth
|
|
||||||
checked: appSettings.notificationTurnsDisplayOn && enabled
|
|
||||||
text: qsTr("Notification turns on the display")
|
|
||||||
enabled: appSettings.notificationFeedback !== AppSettings.NotificationFeedbackNone
|
enabled: appSettings.notificationFeedback !== AppSettings.NotificationFeedbackNone
|
||||||
|
width: parent.columnWidth
|
||||||
height: enabled ? implicitHeight: 0
|
height: enabled ? implicitHeight: 0
|
||||||
clip: height < implicitHeight
|
clip: height < implicitHeight
|
||||||
visible: height > 0
|
visible: height > 0
|
||||||
automaticCheck: false
|
|
||||||
onClicked: {
|
|
||||||
appSettings.notificationTurnsDisplayOn = !checked
|
|
||||||
}
|
|
||||||
Behavior on height { SmoothedAnimation { duration: 200 } }
|
|
||||||
}
|
|
||||||
|
|
||||||
TextSwitch {
|
|
||||||
width: parent.columnWidth
|
|
||||||
checked: appSettings.notificationSoundsEnabled && enabled
|
|
||||||
text: qsTr("Enable notification sounds")
|
|
||||||
description: qsTr("When sounds are enabled, Fernschreiber will use the current Sailfish OS notification sound for chats, which can be configured in the system settings.")
|
|
||||||
enabled: appSettings.notificationFeedback !== AppSettings.NotificationFeedbackNone
|
|
||||||
height: enabled ? implicitHeight: 0
|
|
||||||
clip: height < implicitHeight
|
|
||||||
visible: height > 0
|
|
||||||
automaticCheck: false
|
|
||||||
onClicked: {
|
|
||||||
appSettings.notificationSoundsEnabled = !checked
|
|
||||||
}
|
|
||||||
Behavior on height { SmoothedAnimation { duration: 200 } }
|
Behavior on height { SmoothedAnimation { duration: 200 } }
|
||||||
}
|
|
||||||
|
|
||||||
TextSwitch {
|
TextSwitch {
|
||||||
width: parent.columnWidth
|
checked: appSettings.notificationSuppressContent && enabled
|
||||||
checked: appSettings.notificationAlwaysShowPreview
|
text: qsTr("Hide content in notifications")
|
||||||
text: qsTr("Always append message preview to notifications")
|
enabled: parent.enabled
|
||||||
description: qsTr("In addition to showing the number of unread messages, the latest message will also be appended to notifications.")
|
automaticCheck: false
|
||||||
automaticCheck: false
|
onClicked: {
|
||||||
onClicked: {
|
appSettings.notificationSuppressContent = !checked
|
||||||
appSettings.notificationAlwaysShowPreview = !checked
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
TextSwitch {
|
||||||
|
checked: appSettings.notificationTurnsDisplayOn && enabled
|
||||||
|
text: qsTr("Notification turns on the display")
|
||||||
|
enabled: parent.enabled
|
||||||
|
automaticCheck: false
|
||||||
|
onClicked: {
|
||||||
|
appSettings.notificationTurnsDisplayOn = !checked
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
TextSwitch {
|
||||||
|
checked: appSettings.notificationSoundsEnabled && enabled
|
||||||
|
text: qsTr("Enable notification sounds")
|
||||||
|
description: qsTr("When sounds are enabled, Fernschreiber will use the current Sailfish OS notification sound for chats, which can be configured in the system settings.")
|
||||||
|
enabled: parent.enabled
|
||||||
|
automaticCheck: false
|
||||||
|
onClicked: {
|
||||||
|
appSettings.notificationSoundsEnabled = !checked
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue