linphone-desktop/Linphone/view/Control/Form/Call/ChangeLayoutForm.qml
Gaelle Braud 06647f002a resize the app according to screen definition
fix ui size according to screen resolution
2025-03-07 11:36:34 +01:00

74 lines
2.7 KiB
QML

import QtQuick
import QtQuick.Controls.Basic as Control
import QtQuick.Layouts
import Linphone
import SettingsCpp 1.0
FocusScope {
id: mainItem
property var call
property int conferenceLayout: call && call.core.conferenceVideoLayout || 0
signal changeLayoutRequested(int index)
ColumnLayout {
anchors.fill: parent
anchors.topMargin: Math.round(16 * DefaultStyle.dp)
anchors.bottomMargin: Math.round(16 * DefaultStyle.dp)
anchors.leftMargin: Math.round(17 * DefaultStyle.dp)
anchors.rightMargin: Math.round(17 * DefaultStyle.dp)
spacing: Math.round(12 * DefaultStyle.dp)
// Text {
// Layout.fillWidth: true
// text: qsTr("La disposition choisie sera enregistrée pour vos prochaines réunions")
// font.pixelSize: Math.round(14 * DefaultStyle.dp)
// color: DefaultStyle.main2_500main
// }
RoundedPane {
Layout.fillWidth: true
contentItem: ColumnLayout {
spacing: 0
Repeater {
model: [
{text: qsTr("Mosaïque"), imgUrl: AppIcons.squaresFour},
{text: qsTr("Intervenant actif"), imgUrl: AppIcons.pip},
{text: qsTr("Audio seulement"), imgUrl: AppIcons.waveform}
]
RadioButton {
id: radiobutton
checkOnClick: false
color: DefaultStyle.main1_500_main
indicatorSize: Math.round(20 * DefaultStyle.dp)
leftPadding: indicator.width + spacing
spacing: Math.round(8 * DefaultStyle.dp)
checkable: false // Qt Documentation is wrong: It is true by default. We don't want to change the checked state if the layout change is not effective.
checked: index == 0
? mainItem.conferenceLayout === LinphoneEnums.ConferenceLayout.Grid
: index == 1
? mainItem.conferenceLayout === LinphoneEnums.ConferenceLayout.ActiveSpeaker
: mainItem.conferenceLayout === LinphoneEnums.ConferenceLayout.AudioOnly
onClicked: mainItem.changeLayoutRequested(index)
contentItem: RowLayout {
spacing: Math.round(5 * DefaultStyle.dp)
EffectImage {
id: radioButtonImg
Layout.preferredWidth: Math.round(32 * DefaultStyle.dp)
Layout.preferredHeight: Math.round(32 * DefaultStyle.dp)
imageSource: modelData.imgUrl
colorizationColor: DefaultStyle.main2_500main
}
Text {
text: modelData.text
color: DefaultStyle.main2_500main
verticalAlignment: Text.AlignVCenter
font.pixelSize: Math.round(14 * DefaultStyle.dp)
Layout.fillWidth: true
}
}
}
}
}
}
Item {Layout.fillHeight: true}
}
}