fix login form layout

This commit is contained in:
Gaelle Braud 2023-10-25 14:59:13 +02:00
parent 154a322dd3
commit c643be5d21
3 changed files with 59 additions and 47 deletions

View file

@ -3,8 +3,16 @@ import QtQuick.Layouts 1.0
import QtQuick.Controls as Control import QtQuick.Controls as Control
import Linphone import Linphone
RowLayout { ColumnLayout {
id: root
Layout.alignment: Qt.AlignBottom Layout.alignment: Qt.AlignBottom
signal useSIPButtonClicked()
RowLayout {
ColumnLayout {
Layout.fillHeight: true
Layout.fillWidth: true
clip: true
ColumnLayout { ColumnLayout {
TextInput { TextInput {
id: username id: username
@ -37,6 +45,7 @@ RowLayout {
} }
} }
Button { Button {
Layout.topMargin: 40 Layout.topMargin: 40
inversedColors: true inversedColors: true
@ -44,6 +53,7 @@ RowLayout {
onClicked: {root.useSIPButtonClicked()} onClicked: {root.useSIPButtonClicked()}
} }
} }
}
Item { Item {
Layout.fillWidth: true Layout.fillWidth: true
} }
@ -54,3 +64,7 @@ RowLayout {
source: AppIcons.loginImage source: AppIcons.loginImage
} }
} }
Item {
Layout.fillHeight: true
}
}

View file

@ -35,6 +35,8 @@ LoginLayout {
} }
} }
centerContent: LoginForm {} centerContent: LoginForm {
onUseSIPButtonClicked: root.useSIPButtonClicked()
}
} }

View file

@ -63,8 +63,6 @@ LoginLayout {
Component { Component {
id: firstItem id: firstItem
ColumnLayout { ColumnLayout {
// Layout.fillWidth: true
// Layout.fillHeight: true
Text { Text {
Layout.preferredWidth: 361 Layout.preferredWidth: 361
@ -111,8 +109,6 @@ LoginLayout {
Component { Component {
id: secondItem id: secondItem
ColumnLayout { ColumnLayout {
// Layout.fillWidth: true
// Layout.fillHeight: true
TextInput { TextInput {
id: username id: username
label: "Username" label: "Username"