diff options
author | David Elsing <david.elsing@posteo.net> | 2023-03-26 23:08:43 +0200 |
---|---|---|
committer | David Elsing <david.elsing@posteo.net> | 2023-03-30 17:36:40 +0200 |
commit | 2aadc7c2c49f0b49459600c01d6b2db3cd09dfe5 (patch) | |
tree | 7001cf4a6653114f5a2ce160b39a1a56f74af913 /resources/qml/voip | |
parent | Add missing license headers (diff) | |
download | nheko-2aadc7c2c49f0b49459600c01d6b2db3cd09dfe5.tar.xz |
Improve choosing screen share type
Diffstat (limited to 'resources/qml/voip')
-rw-r--r-- | resources/qml/voip/ScreenShare.qml | 38 |
1 files changed, 9 insertions, 29 deletions
diff --git a/resources/qml/voip/ScreenShare.qml b/resources/qml/voip/ScreenShare.qml index 80ea75d2..1a82a5ce 100644 --- a/resources/qml/voip/ScreenShare.qml +++ b/resources/qml/voip/ScreenShare.qml @@ -14,10 +14,6 @@ Popup { anchors.centerIn: parent; Component.onCompleted: { - if (CallManager.screenShareX11Available) - CallManager.setScreenShareType(ScreenShareType.X11); - else - CallManager.setScreenShareType(ScreenShareType.XDP); frameRateCombo.currentIndex = frameRateCombo.find(Settings.screenShareFrameRate); } Component.onDestruction: { @@ -47,29 +43,13 @@ Popup { color: Nheko.colors.windowText } - RadioButton { - id: screenshare_X11 - text: qsTr("X11"); - visible: CallManager.screenShareX11Available - checked: CallManager.screenShareX11Available - onToggled: { - if (screenshare_X11.checked) - CallManager.setScreenShareType(ScreenShareType.X11); - else - CallManager.setScreenShareType(ScreenShareType.XDP); - } - } - RadioButton { - id: screenshare_XDP - text: qsTr("xdg-desktop-portal"); - checked: !CallManager.screenShareX11Available - onToggled: { - if (screenshare_XDP.checked) - CallManager.setScreenShareType(ScreenShareType.XDP); - else - CallManager.setScreenShareType(ScreenShareType.X11); - } - } + ComboBox { + id: screenshareType + + Layout.fillWidth: true + model: CallManager.screenShareTypeList() + onCurrentIndexChanged: CallManager.setScreenShareType(currentIndex); + } } RowLayout { @@ -84,7 +64,7 @@ Popup { } ComboBox { - visible: screenshare_X11.checked + visible: CallManager.screenShareType == ScreenShareType.X11 id: windowCombo Layout.fillWidth: true @@ -92,7 +72,7 @@ Popup { } Button { - visible: screenshare_XDP.checked + visible: CallManager.screenShareType == ScreenShareType.XDP highlighted: !CallManager.screenShareReady text: qsTr("Request screencast") onClicked: { |