mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-17 11:28:07 +00:00
fix #LINQT-1331 add flickables for 13" screens
This commit is contained in:
parent
aade817755
commit
fe40a9586b
4 changed files with 258 additions and 236 deletions
|
|
@ -78,32 +78,41 @@ LoginLayout {
|
|||
}
|
||||
]
|
||||
centerContent: [
|
||||
ColumnLayout {
|
||||
Flickable {
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
anchors.leftMargin: 127 * DefaultStyle.dp
|
||||
anchors.topMargin: 70 * DefaultStyle.dp
|
||||
spacing: 0
|
||||
LoginForm {
|
||||
id: loginForm
|
||||
onConnectionSucceed: mainItem.connectionSucceed()
|
||||
}
|
||||
Button {
|
||||
inversedColors: true
|
||||
Layout.preferredWidth: loginForm.width
|
||||
Layout.preferredHeight: 47 * DefaultStyle.dp
|
||||
Layout.topMargin: 39 * DefaultStyle.dp
|
||||
visible: !SettingsCpp.assistantHideThirdPartyAccount
|
||||
text: qsTr("Compte SIP tiers")
|
||||
onClicked: {mainItem.useSIPButtonClicked()}
|
||||
}
|
||||
Button {
|
||||
inversedColors: true
|
||||
Layout.preferredWidth: loginForm.width
|
||||
Layout.preferredHeight: 47 * DefaultStyle.dp
|
||||
Layout.topMargin: 25 * DefaultStyle.dp
|
||||
text: qsTr("Configuration distante")
|
||||
onClicked: {fetchConfigDialog.open()}
|
||||
anchors.bottom: parent.bottom
|
||||
width: contentWidth
|
||||
contentWidth: content.implicitWidth
|
||||
contentHeight: content.implicitHeight
|
||||
clip: true
|
||||
flickableDirection: Flickable.VerticalFlick
|
||||
ColumnLayout {
|
||||
id: content
|
||||
spacing: 0
|
||||
LoginForm {
|
||||
id: loginForm
|
||||
onConnectionSucceed: mainItem.connectionSucceed()
|
||||
}
|
||||
Button {
|
||||
inversedColors: true
|
||||
Layout.preferredWidth: loginForm.width
|
||||
Layout.preferredHeight: 47 * DefaultStyle.dp
|
||||
Layout.topMargin: 39 * DefaultStyle.dp
|
||||
visible: !SettingsCpp.assistantHideThirdPartyAccount
|
||||
text: qsTr("Compte SIP tiers")
|
||||
onClicked: {mainItem.useSIPButtonClicked()}
|
||||
}
|
||||
Button {
|
||||
inversedColors: true
|
||||
Layout.preferredWidth: loginForm.width
|
||||
Layout.preferredHeight: 47 * DefaultStyle.dp
|
||||
Layout.topMargin: 25 * DefaultStyle.dp
|
||||
text: qsTr("Configuration distante")
|
||||
onClicked: {fetchConfigDialog.open()}
|
||||
}
|
||||
}
|
||||
},
|
||||
Image {
|
||||
|
|
|
|||
|
|
@ -81,162 +81,177 @@ LoginLayout {
|
|||
|
||||
Component {
|
||||
id: firstItem
|
||||
ColumnLayout {
|
||||
spacing: 85 * DefaultStyle.dp
|
||||
Layout.maximumHeight: 420 * DefaultStyle.dp
|
||||
Flickable {
|
||||
width: contentWidth
|
||||
contentWidth: content.implicitWidth
|
||||
contentHeight: content.implicitHeight
|
||||
clip: true
|
||||
flickableDirection: Flickable.VerticalFlick
|
||||
ColumnLayout {
|
||||
spacing: 0
|
||||
id: content
|
||||
spacing: 85 * DefaultStyle.dp
|
||||
ColumnLayout {
|
||||
spacing: 28 * DefaultStyle.dp
|
||||
Text {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredWidth: rootStackView.width
|
||||
wrapMode: Text.WordWrap
|
||||
color: DefaultStyle.main2_900
|
||||
font {
|
||||
pixelSize: 14 * DefaultStyle.dp
|
||||
weight: 400* DefaultStyle.dp
|
||||
spacing: 0
|
||||
ColumnLayout {
|
||||
spacing: 28 * DefaultStyle.dp
|
||||
Text {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredWidth: rootStackView.width
|
||||
wrapMode: Text.WordWrap
|
||||
color: DefaultStyle.main2_900
|
||||
font {
|
||||
pixelSize: 14 * DefaultStyle.dp
|
||||
weight: 400* DefaultStyle.dp
|
||||
}
|
||||
text: "Certaines fonctionnalités nécessitent un compte Linphone, comme la messagerie de groupe, les vidéoconférences..."
|
||||
}
|
||||
text: "Certaines fonctionnalités nécessitent un compte Linphone, comme la messagerie de groupe, les vidéoconférences..."
|
||||
}
|
||||
Text {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredWidth: rootStackView.width
|
||||
wrapMode: Text.WordWrap
|
||||
color: DefaultStyle.main2_900
|
||||
font {
|
||||
pixelSize: 14 * DefaultStyle.dp
|
||||
weight: 400* DefaultStyle.dp
|
||||
Text {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredWidth: rootStackView.width
|
||||
wrapMode: Text.WordWrap
|
||||
color: DefaultStyle.main2_900
|
||||
font {
|
||||
pixelSize: 14 * DefaultStyle.dp
|
||||
weight: 400* DefaultStyle.dp
|
||||
}
|
||||
text:"Ces fonctionnalités sont cachées lorsque vous vous enregistrez avec un compte SIP tiers."
|
||||
}
|
||||
text:"Ces fonctionnalités sont cachées lorsque vous vous enregistrez avec un compte SIP tiers."
|
||||
}
|
||||
Text {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredWidth: rootStackView.width
|
||||
wrapMode: Text.WordWrap
|
||||
color: DefaultStyle.main2_900
|
||||
font {
|
||||
pixelSize: 14 * DefaultStyle.dp
|
||||
weight: 400* DefaultStyle.dp
|
||||
Text {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredWidth: rootStackView.width
|
||||
wrapMode: Text.WordWrap
|
||||
color: DefaultStyle.main2_900
|
||||
font {
|
||||
pixelSize: 14 * DefaultStyle.dp
|
||||
weight: 400* DefaultStyle.dp
|
||||
}
|
||||
text: "Pour les activer dans un projet commercial, veuillez nous contacter. "
|
||||
}
|
||||
text: "Pour les activer dans un projet commercial, veuillez nous contacter. "
|
||||
}
|
||||
Button {
|
||||
id: openLinkButton
|
||||
Layout.alignment: Qt.AlignCenter
|
||||
Layout.topMargin: 18 * DefaultStyle.dp
|
||||
text: "linphone.org/contact"
|
||||
textSize: 13 * DefaultStyle.dp
|
||||
inversedColors: true
|
||||
leftPadding: 12 * DefaultStyle.dp
|
||||
rightPadding: 12 * DefaultStyle.dp
|
||||
topPadding: 6 * DefaultStyle.dp
|
||||
bottomPadding: 6 * DefaultStyle.dp
|
||||
onClicked: {
|
||||
Qt.openUrlExternally(ConstantsCpp.ContactUrl)
|
||||
}
|
||||
KeyNavigation.up: backButton
|
||||
KeyNavigation.down: createAccountButton
|
||||
}
|
||||
}
|
||||
Button {
|
||||
id: openLinkButton
|
||||
Layout.alignment: Qt.AlignCenter
|
||||
Layout.topMargin: 18 * DefaultStyle.dp
|
||||
text: "linphone.org/contact"
|
||||
textSize: 13 * DefaultStyle.dp
|
||||
inversedColors: true
|
||||
leftPadding: 12 * DefaultStyle.dp
|
||||
rightPadding: 12 * DefaultStyle.dp
|
||||
topPadding: 6 * DefaultStyle.dp
|
||||
bottomPadding: 6 * DefaultStyle.dp
|
||||
onClicked: {
|
||||
Qt.openUrlExternally(ConstantsCpp.ContactUrl)
|
||||
ColumnLayout {
|
||||
spacing: 20 * DefaultStyle.dp
|
||||
Button {
|
||||
id: createAccountButton
|
||||
// Layout.topMargin: 85 * DefaultStyle.dp
|
||||
Layout.fillWidth: true
|
||||
inversedColors: true
|
||||
text: qsTr("Créer un compte linphone")
|
||||
leftPadding: 20 * DefaultStyle.dp
|
||||
rightPadding: 20 * DefaultStyle.dp
|
||||
topPadding: 11 * DefaultStyle.dp
|
||||
bottomPadding: 11 * DefaultStyle.dp
|
||||
onClicked: {
|
||||
console.debug("[SIPLoginPage] User: click register")
|
||||
mainItem.goToRegister()
|
||||
}
|
||||
KeyNavigation.up: openLinkButton
|
||||
KeyNavigation.down: continueButton
|
||||
}
|
||||
KeyNavigation.up: backButton
|
||||
KeyNavigation.down: createAccountButton
|
||||
}
|
||||
}
|
||||
ColumnLayout {
|
||||
spacing: 20 * DefaultStyle.dp
|
||||
Button {
|
||||
id: createAccountButton
|
||||
// Layout.topMargin: 85 * DefaultStyle.dp
|
||||
Layout.fillWidth: true
|
||||
inversedColors: true
|
||||
text: qsTr("Créer un compte linphone")
|
||||
leftPadding: 20 * DefaultStyle.dp
|
||||
rightPadding: 20 * DefaultStyle.dp
|
||||
topPadding: 11 * DefaultStyle.dp
|
||||
bottomPadding: 11 * DefaultStyle.dp
|
||||
onClicked: {
|
||||
console.debug("[SIPLoginPage] User: click register")
|
||||
mainItem.goToRegister()
|
||||
Button {
|
||||
id: continueButton
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Je comprends")
|
||||
leftPadding: 20 * DefaultStyle.dp
|
||||
rightPadding: 20 * DefaultStyle.dp
|
||||
topPadding: 11 * DefaultStyle.dp
|
||||
bottomPadding: 11 * DefaultStyle.dp
|
||||
onClicked: {
|
||||
rootStackView.replace(secondItem)
|
||||
}
|
||||
KeyNavigation.up: createAccountButton
|
||||
}
|
||||
KeyNavigation.up: openLinkButton
|
||||
KeyNavigation.down: continueButton
|
||||
}
|
||||
Button {
|
||||
id: continueButton
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Je comprends")
|
||||
leftPadding: 20 * DefaultStyle.dp
|
||||
rightPadding: 20 * DefaultStyle.dp
|
||||
topPadding: 11 * DefaultStyle.dp
|
||||
bottomPadding: 11 * DefaultStyle.dp
|
||||
onClicked: {
|
||||
rootStackView.replace(secondItem)
|
||||
}
|
||||
KeyNavigation.up: createAccountButton
|
||||
Item {
|
||||
Layout.fillHeight: true
|
||||
}
|
||||
}
|
||||
Item {
|
||||
Layout.fillHeight: true
|
||||
}
|
||||
}
|
||||
}
|
||||
Component {
|
||||
id: secondItem
|
||||
ColumnLayout {
|
||||
spacing: 2 * DefaultStyle.dp
|
||||
Flickable {
|
||||
width: contentWidth
|
||||
contentWidth: content.implicitWidth
|
||||
contentHeight: content.implicitHeight
|
||||
clip: true
|
||||
flickableDirection: Flickable.VerticalFlick
|
||||
ColumnLayout {
|
||||
spacing: 16 * DefaultStyle.dp
|
||||
FormItemLayout {
|
||||
id: username
|
||||
label: qsTr("Nom d'utilisateur")
|
||||
mandatory: true
|
||||
enableErrorText: true
|
||||
contentItem: TextField {
|
||||
id: usernameEdit
|
||||
isError: username.errorTextVisible
|
||||
Layout.preferredWidth: 360 * DefaultStyle.dp
|
||||
KeyNavigation.down: passwordEdit
|
||||
}
|
||||
}
|
||||
FormItemLayout {
|
||||
id: password
|
||||
label: qsTr("Mot de passe")
|
||||
mandatory: true
|
||||
enableErrorText: true
|
||||
contentItem: TextField {
|
||||
id: passwordEdit
|
||||
isError: password.errorTextVisible
|
||||
hidden: true
|
||||
Layout.preferredWidth: 360 * DefaultStyle.dp
|
||||
KeyNavigation.up: usernameEdit
|
||||
KeyNavigation.down: domainEdit
|
||||
}
|
||||
}
|
||||
FormItemLayout {
|
||||
id: domain
|
||||
label: qsTr("Domaine")
|
||||
mandatory: true
|
||||
enableErrorText: true
|
||||
contentItem: TextField {
|
||||
id: domainEdit
|
||||
isError: domain.errorTextVisible
|
||||
initialText: SettingsCpp.assistantThirdPartySipAccountDomain
|
||||
Layout.preferredWidth: 360 * DefaultStyle.dp
|
||||
KeyNavigation.up: passwordEdit
|
||||
KeyNavigation.down: displayName
|
||||
}
|
||||
Connections {
|
||||
target: SettingsCpp
|
||||
function onAssistantThirdPartySipAccountDomainChanged() {
|
||||
domainEdit.resetText()
|
||||
id: content
|
||||
spacing: 2 * DefaultStyle.dp
|
||||
ColumnLayout {
|
||||
spacing: 16 * DefaultStyle.dp
|
||||
FormItemLayout {
|
||||
id: username
|
||||
label: qsTr("Nom d'utilisateur")
|
||||
mandatory: true
|
||||
enableErrorText: true
|
||||
contentItem: TextField {
|
||||
id: usernameEdit
|
||||
isError: username.errorTextVisible
|
||||
Layout.preferredWidth: 360 * DefaultStyle.dp
|
||||
KeyNavigation.down: passwordEdit
|
||||
}
|
||||
}
|
||||
}
|
||||
FormItemLayout {
|
||||
label: qsTr("Nom d'affichage")
|
||||
contentItem: TextField {
|
||||
id: displayName
|
||||
Layout.preferredWidth: 360 * DefaultStyle.dp
|
||||
KeyNavigation.up: domainEdit
|
||||
KeyNavigation.down: transportCbox
|
||||
FormItemLayout {
|
||||
id: password
|
||||
label: qsTr("Mot de passe")
|
||||
mandatory: true
|
||||
enableErrorText: true
|
||||
contentItem: TextField {
|
||||
id: passwordEdit
|
||||
isError: password.errorTextVisible
|
||||
hidden: true
|
||||
Layout.preferredWidth: 360 * DefaultStyle.dp
|
||||
KeyNavigation.up: usernameEdit
|
||||
KeyNavigation.down: domainEdit
|
||||
}
|
||||
}
|
||||
FormItemLayout {
|
||||
id: domain
|
||||
label: qsTr("Domaine")
|
||||
mandatory: true
|
||||
enableErrorText: true
|
||||
contentItem: TextField {
|
||||
id: domainEdit
|
||||
isError: domain.errorTextVisible
|
||||
initialText: SettingsCpp.assistantThirdPartySipAccountDomain
|
||||
Layout.preferredWidth: 360 * DefaultStyle.dp
|
||||
KeyNavigation.up: passwordEdit
|
||||
KeyNavigation.down: displayName
|
||||
}
|
||||
Connections {
|
||||
target: SettingsCpp
|
||||
function onAssistantThirdPartySipAccountDomainChanged() {
|
||||
domainEdit.resetText()
|
||||
}
|
||||
}
|
||||
}
|
||||
FormItemLayout {
|
||||
label: qsTr("Nom d'affichage")
|
||||
contentItem: TextField {
|
||||
id: displayName
|
||||
Layout.preferredWidth: 360 * DefaultStyle.dp
|
||||
KeyNavigation.up: domainEdit
|
||||
KeyNavigation.down: transportCbox
|
||||
}
|
||||
}
|
||||
}
|
||||
FormItemLayout {
|
||||
|
|
@ -258,92 +273,92 @@ LoginLayout {
|
|||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
TemporaryText {
|
||||
id: errorText
|
||||
Connections {
|
||||
target: LoginPageCpp
|
||||
function onErrorMessageChanged(error) {
|
||||
errorText.text = error
|
||||
}
|
||||
function onRegistrationStateChanged() {
|
||||
if (LoginPageCpp.registrationState === LinphoneEnums.RegistrationState.Ok) {
|
||||
mainItem.connectionSucceed()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Button {
|
||||
id: connectionButton
|
||||
Layout.topMargin: 32 * DefaultStyle.dp
|
||||
leftPadding: 20 * DefaultStyle.dp
|
||||
rightPadding: 20 * DefaultStyle.dp
|
||||
topPadding: 11 * DefaultStyle.dp
|
||||
bottomPadding: 11 * DefaultStyle.dp
|
||||
contentItem: StackLayout {
|
||||
id: connectionButtonContent
|
||||
currentIndex: 0
|
||||
Text {
|
||||
text: qsTr("Connexion")
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
|
||||
font {
|
||||
pixelSize: 18 * DefaultStyle.dp
|
||||
weight: 600 * DefaultStyle.dp
|
||||
}
|
||||
color: DefaultStyle.grey_0
|
||||
}
|
||||
BusyIndicator {
|
||||
implicitWidth: parent.height
|
||||
implicitHeight: parent.height
|
||||
Layout.alignment: Qt.AlignCenter
|
||||
indicatorColor: DefaultStyle.grey_0
|
||||
}
|
||||
TemporaryText {
|
||||
id: errorText
|
||||
Connections {
|
||||
target: LoginPageCpp
|
||||
function onRegistrationStateChanged() {
|
||||
if (LoginPageCpp.registrationState != LinphoneEnums.RegistrationState.Progress) {
|
||||
connectionButton.enabled = true
|
||||
connectionButtonContent.currentIndex = 0
|
||||
}
|
||||
}
|
||||
function onErrorMessageChanged(error) {
|
||||
if (error.length != 0) {
|
||||
connectionButton.enabled = true
|
||||
connectionButtonContent.currentIndex = 0
|
||||
errorText.text = error
|
||||
}
|
||||
function onRegistrationStateChanged() {
|
||||
if (LoginPageCpp.registrationState === LinphoneEnums.RegistrationState.Ok) {
|
||||
mainItem.connectionSucceed()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function trigger() {
|
||||
username.errorMessage = ""
|
||||
password.errorMessage = ""
|
||||
domain.errorMessage = ""
|
||||
errorText.text = ""
|
||||
Button {
|
||||
id: connectionButton
|
||||
Layout.topMargin: 32 * DefaultStyle.dp
|
||||
leftPadding: 20 * DefaultStyle.dp
|
||||
rightPadding: 20 * DefaultStyle.dp
|
||||
topPadding: 11 * DefaultStyle.dp
|
||||
bottomPadding: 11 * DefaultStyle.dp
|
||||
contentItem: StackLayout {
|
||||
id: connectionButtonContent
|
||||
currentIndex: 0
|
||||
Text {
|
||||
text: qsTr("Connexion")
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
|
||||
if (usernameEdit.text.length == 0 || passwordEdit.text.length == 0 || domainEdit.text.length == 0) {
|
||||
if (usernameEdit.text.length == 0)
|
||||
username.errorMessage = qsTr("Veuillez saisir un nom d'utilisateur")
|
||||
if (passwordEdit.text.length == 0)
|
||||
password.errorMessage = qsTr("Veuillez saisir un mot de passe")
|
||||
if (domainEdit.text.length == 0)
|
||||
domain.errorMessage = qsTr("Veuillez saisir un nom de domaine")
|
||||
return
|
||||
font {
|
||||
pixelSize: 18 * DefaultStyle.dp
|
||||
weight: 600 * DefaultStyle.dp
|
||||
}
|
||||
color: DefaultStyle.grey_0
|
||||
}
|
||||
BusyIndicator {
|
||||
implicitWidth: parent.height
|
||||
implicitHeight: parent.height
|
||||
Layout.alignment: Qt.AlignCenter
|
||||
indicatorColor: DefaultStyle.grey_0
|
||||
}
|
||||
Connections {
|
||||
target: LoginPageCpp
|
||||
function onRegistrationStateChanged() {
|
||||
if (LoginPageCpp.registrationState != LinphoneEnums.RegistrationState.Progress) {
|
||||
connectionButton.enabled = true
|
||||
connectionButtonContent.currentIndex = 0
|
||||
}
|
||||
}
|
||||
function onErrorMessageChanged(error) {
|
||||
if (error.length != 0) {
|
||||
connectionButton.enabled = true
|
||||
connectionButtonContent.currentIndex = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
console.debug("[SIPLoginPage] User: Log in")
|
||||
LoginPageCpp.login(usernameEdit.text, passwordEdit.text, displayName.text, domainEdit.text, transportCbox.currentValue);
|
||||
connectionButton.enabled = false
|
||||
connectionButtonContent.currentIndex = 1
|
||||
|
||||
function trigger() {
|
||||
username.errorMessage = ""
|
||||
password.errorMessage = ""
|
||||
domain.errorMessage = ""
|
||||
errorText.text = ""
|
||||
|
||||
if (usernameEdit.text.length == 0 || passwordEdit.text.length == 0 || domainEdit.text.length == 0) {
|
||||
if (usernameEdit.text.length == 0)
|
||||
username.errorMessage = qsTr("Veuillez saisir un nom d'utilisateur")
|
||||
if (passwordEdit.text.length == 0)
|
||||
password.errorMessage = qsTr("Veuillez saisir un mot de passe")
|
||||
if (domainEdit.text.length == 0)
|
||||
domain.errorMessage = qsTr("Veuillez saisir un nom de domaine")
|
||||
return
|
||||
}
|
||||
console.debug("[SIPLoginPage] User: Log in")
|
||||
LoginPageCpp.login(usernameEdit.text, passwordEdit.text, displayName.text, domainEdit.text, transportCbox.currentValue);
|
||||
connectionButton.enabled = false
|
||||
connectionButtonContent.currentIndex = 1
|
||||
}
|
||||
onPressed: trigger()
|
||||
KeyNavigation.up: transportCbox
|
||||
}
|
||||
Item {
|
||||
Layout.fillHeight: true
|
||||
}
|
||||
onPressed: trigger()
|
||||
KeyNavigation.up: transportCbox
|
||||
}
|
||||
Item {
|
||||
Layout.fillHeight: true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,8 +33,6 @@ LoginLayout {
|
|||
|
||||
centerContent: ColumnLayout {
|
||||
spacing: 80 * DefaultStyle.dp
|
||||
Layout.topMargin: 70 * DefaultStyle.dp
|
||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
|
||||
RowLayout {
|
||||
id: radioButtonsLayout
|
||||
Layout.fillWidth: true
|
||||
|
|
|
|||
|
|
@ -67,10 +67,10 @@ Rectangle {
|
|||
id: centerLayout
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
z: 1
|
||||
}
|
||||
Image {
|
||||
id: bottomMountains
|
||||
z: -1
|
||||
source: AppIcons.belledonne
|
||||
fillMode: Image.Stretch
|
||||
Layout.fillWidth: true
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue