Use native QML switches

switches
Loren Burkholder 2 years ago
parent b0e4cce065
commit 5640f10294
  1. 6
      resources/qml/SelfVerificationCheck.qml
  2. 2
      resources/qml/dialogs/AllowedRoomsSettingsDialog.qml
  3. 2
      resources/qml/dialogs/CreateDirect.qml
  4. 6
      resources/qml/dialogs/CreateRoom.qml
  5. 6
      resources/qml/dialogs/HiddenEventsDialog.qml
  6. 8
      resources/qml/dialogs/ImagePackEditorDialog.qml
  7. 2
      resources/qml/dialogs/ImagePackSettingsDialog.qml
  8. 2
      resources/qml/dialogs/InviteDialog.qml
  9. 6
      resources/qml/dialogs/PowerLevelSpacesApplyDialog.qml
  10. 10
      resources/qml/dialogs/RoomSettings.qml
  11. 2
      resources/qml/pages/UserSettingsPage.qml
  12. 2
      resources/qml/pages/WelcomePage.qml
  13. 6
      resources/qml/voip/ScreenShare.qml

@ -131,7 +131,7 @@ Item {
Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
Layout.fillWidth: true
ToggleButton {
Switch {
id: storeSecretsOnline
checked: true
@ -161,7 +161,7 @@ Item {
Layout.fillWidth: true
visible: storeSecretsOnline.checked
ToggleButton {
Switch {
id: usePassword
checked: false
@ -197,7 +197,7 @@ Item {
Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
Layout.fillWidth: true
ToggleButton {
Switch {
id: useOnlineKeyBackup
checked: true

@ -84,7 +84,7 @@ ApplicationWindow {
}
}
ToggleButton {
Switch {
checked: model.allowed
Layout.alignment: Qt.AlignRight
onCheckedChanged: model.allowed = checked

@ -91,7 +91,7 @@ ApplicationWindow {
text: qsTr("Encryption")
color: Nheko.colors.text
}
ToggleButton {
Switch {
Layout.alignment: Qt.AlignRight
id: encryption
checked: otherUserHasE2ee

@ -90,7 +90,7 @@ ApplicationWindow {
ToolTip.text: qsTr("Public rooms can be joined by anyone; private rooms need explicit invites.")
ToolTip.delay: Nheko.tooltipDelay
}
ToggleButton {
Switch {
Layout.alignment: Qt.AlignRight
Layout.preferredWidth: implicitWidth
id: isPublic
@ -109,7 +109,7 @@ ApplicationWindow {
ToolTip.text: qsTr("All invitees are given the same power level as the creator")
ToolTip.delay: Nheko.tooltipDelay
}
ToggleButton {
Switch {
visible: !space
Layout.alignment: Qt.AlignRight
Layout.preferredWidth: implicitWidth
@ -130,7 +130,7 @@ ApplicationWindow {
ToolTip.text: qsTr("Caution: Encryption cannot be disabled")
ToolTip.delay: Nheko.tooltipDelay
}
ToggleButton {
Switch {
visible: !space
Layout.alignment: Qt.AlignRight
Layout.preferredWidth: implicitWidth

@ -79,7 +79,7 @@ ApplicationWindow {
}
}
ToggleButton {
Switch {
Layout.alignment: Qt.AlignRight
checked: !hiddenEvents.hiddenEvents.includes(MtxEvent.Member)
onToggled: hiddenEvents.toggle(MtxEvent.Member)
@ -96,7 +96,7 @@ ApplicationWindow {
}
}
ToggleButton {
Switch {
Layout.alignment: Qt.AlignRight
checked: !hiddenEvents.hiddenEvents.includes(MtxEvent.PowerLevels)
onToggled: hiddenEvents.toggle(MtxEvent.PowerLevels)
@ -107,7 +107,7 @@ ApplicationWindow {
Layout.fillWidth: true
}
ToggleButton {
Switch {
Layout.alignment: Qt.AlignRight
checked: !hiddenEvents.hiddenEvents.includes(MtxEvent.Sticker)
onToggled: hiddenEvents.toggle(MtxEvent.Sticker)

@ -206,7 +206,7 @@ ApplicationWindow {
text: qsTr("Use as Emoji")
}
ToggleButton {
Switch {
checked: imagePack.isEmotePack
onCheckedChanged: imagePack.isEmotePack = checked
Layout.alignment: Qt.AlignRight
@ -219,7 +219,7 @@ ApplicationWindow {
text: qsTr("Use as Sticker")
}
ToggleButton {
Switch {
checked: imagePack.isStickerPack
onCheckedChanged: imagePack.isStickerPack = checked
Layout.alignment: Qt.AlignRight
@ -276,7 +276,7 @@ ApplicationWindow {
text: qsTr("Use as Emoji")
}
ToggleButton {
Switch {
checked: imagePack.data(imagePack.index(currentImageIndex, 0), SingleImagePackModel.IsEmote)
onCheckedChanged: imagePack.setData(imagePack.index(currentImageIndex, 0), checked, SingleImagePackModel.IsEmote)
Layout.alignment: Qt.AlignRight
@ -289,7 +289,7 @@ ApplicationWindow {
text: qsTr("Use as Sticker")
}
ToggleButton {
Switch {
checked: imagePack.data(imagePack.index(currentImageIndex, 0), SingleImagePackModel.IsSticker)
onCheckedChanged: imagePack.setData(imagePack.index(currentImageIndex, 0), checked, SingleImagePackModel.IsSticker)
Layout.alignment: Qt.AlignRight

@ -185,7 +185,7 @@ ApplicationWindow {
text: qsTr("Enable globally")
}
ToggleButton {
Switch {
ToolTip.text: qsTr("Enables this pack to be used in all rooms")
checked: currentPack ? currentPack.isGloballyEnabled : false
onCheckedChanged: currentPack.isGloballyEnabled = checked

@ -139,7 +139,7 @@ ApplicationWindow {
}
}
ToggleButton {
Switch {
id: searchOnServer
checked: false
onClicked: userSearch.model.setSearchString(inviteeEntry.text)

@ -58,7 +58,7 @@ ApplicationWindow {
color: Nheko.colors.text
}
ToggleButton {
Switch {
checked: editingModel.spaces.applyToChildren
Layout.alignment: Qt.AlignRight
onCheckedChanged: editingModel.spaces.applyToChildren = checked
@ -70,7 +70,7 @@ ApplicationWindow {
color: Nheko.colors.text
}
ToggleButton {
Switch {
checked: editingModel.spaces.overwriteDiverged
Layout.alignment: Qt.AlignRight
onCheckedChanged: editingModel.spaces.overwriteDiverged = checked
@ -122,7 +122,7 @@ ApplicationWindow {
}
}
ToggleButton {
Switch {
checked: model.applyPermissions
Layout.alignment: Qt.AlignRight
onCheckedChanged: model.applyPermissions = checked

@ -292,7 +292,7 @@ ApplicationWindow {
color: Nheko.colors.text
}
ToggleButton {
Switch {
id: publicRoomButton
enabled: roomSettings.canChangeJoinRules
@ -307,7 +307,7 @@ ApplicationWindow {
visible: knockingButton.visible
}
ToggleButton {
Switch {
id: knockingButton
visible: !publicRoomButton.checked
@ -326,7 +326,7 @@ ApplicationWindow {
visible: restrictedButton.visible
}
ToggleButton {
Switch {
id: restrictedButton
visible: !publicRoomButton.checked
@ -363,7 +363,7 @@ ApplicationWindow {
color: Nheko.colors.text
}
ToggleButton {
Switch {
id: guestAccessButton
enabled: roomSettings.canChangeJoinRules
@ -386,7 +386,7 @@ ApplicationWindow {
color: Nheko.colors.text
}
ToggleButton {
Switch {
id: encryptionToggle
checked: roomSettings.isEncryptionEnabled

@ -86,7 +86,7 @@ Rectangle {
DelegateChoice {
roleValue: UserSettingsModel.Toggle
ToggleButton {
Switch {
checked: model.value
onCheckedChanged: model.value = checked
enabled: model.enabled

@ -75,7 +75,7 @@ ColumnLayout {
Layout.alignment: Qt.AlignHCenter
Layout.margins: Nheko.paddingLarge
ToggleButton {
Switch {
Layout.margins: Nheko.paddingLarge
Layout.alignment: Qt.AlignRight
checked: Settings.reducedMotion

@ -78,7 +78,7 @@ Popup {
text: qsTr("Include your camera picture-in-picture")
}
ToggleButton {
Switch {
id: pipCheckBox
enabled: CallManager.cameras.length > 0
@ -92,7 +92,7 @@ Popup {
ToolTip.visible: hovered
}
ToggleButton {
Switch {
id: remoteVideoCheckBox
Layout.alignment: Qt.AlignRight
@ -105,7 +105,7 @@ Popup {
text: qsTr("Hide mouse cursor")
}
ToggleButton {
Switch {
id: hideCursorCheckBox
Layout.alignment: Qt.AlignRight

Loading…
Cancel
Save