fix login form layout
This commit is contained in:
parent
154a322dd3
commit
c643be5d21
3 changed files with 59 additions and 47 deletions
|
|
@ -3,54 +3,68 @@ 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
|
||||||
ColumnLayout {
|
signal useSIPButtonClicked()
|
||||||
TextInput {
|
RowLayout {
|
||||||
id: username
|
ColumnLayout {
|
||||||
label: "Username"
|
Layout.fillHeight: true
|
||||||
mandatory: true
|
Layout.fillWidth: true
|
||||||
textInputWidth: 250
|
clip: true
|
||||||
}
|
|
||||||
TextInput {
|
|
||||||
id: password
|
|
||||||
label: "Password"
|
|
||||||
mandatory: true
|
|
||||||
hidden: true
|
|
||||||
textInputWidth: 250
|
|
||||||
}
|
|
||||||
|
|
||||||
RowLayout {
|
ColumnLayout {
|
||||||
id: lastFormLineLayout
|
TextInput {
|
||||||
Button {
|
id: username
|
||||||
text: 'Log in'
|
label: "Username"
|
||||||
Layout.rightMargin: 20
|
mandatory: true
|
||||||
onClicked: {
|
textInputWidth: 250
|
||||||
LoginPageCpp.login(username.inputText, password.inputText);
|
}
|
||||||
|
TextInput {
|
||||||
|
id: password
|
||||||
|
label: "Password"
|
||||||
|
mandatory: true
|
||||||
|
hidden: true
|
||||||
|
textInputWidth: 250
|
||||||
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
id: lastFormLineLayout
|
||||||
|
Button {
|
||||||
|
text: 'Log in'
|
||||||
|
Layout.rightMargin: 20
|
||||||
|
onClicked: {
|
||||||
|
LoginPageCpp.login(username.inputText, password.inputText);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Text {
|
||||||
|
color: DefaultStyle.grayColor
|
||||||
|
text: "Forgotten password?"
|
||||||
|
font.underline: true
|
||||||
|
font.pointSize: DefaultStyle.defaultTextSize
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Button {
|
||||||
|
Layout.topMargin: 40
|
||||||
|
inversedColors: true
|
||||||
|
text: "Use SIP Account"
|
||||||
|
onClicked: {root.useSIPButtonClicked()}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Text {
|
|
||||||
color: DefaultStyle.grayColor
|
|
||||||
text: "Forgotten password?"
|
|
||||||
font.underline: true
|
|
||||||
font.pointSize: DefaultStyle.defaultTextSize
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
Button {
|
Item {
|
||||||
Layout.topMargin: 40
|
Layout.fillWidth: true
|
||||||
inversedColors: true
|
}
|
||||||
text: "Use SIP Account"
|
Image {
|
||||||
onClicked: {root.useSIPButtonClicked()}
|
Layout.rightMargin: 40
|
||||||
|
Layout.preferredWidth: 300
|
||||||
|
fillMode: Image.PreserveAspectFit
|
||||||
|
source: AppIcons.loginImage
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Item {
|
Item {
|
||||||
Layout.fillWidth: true
|
Layout.fillHeight: true
|
||||||
}
|
}
|
||||||
Image {
|
}
|
||||||
Layout.rightMargin: 40
|
|
||||||
Layout.preferredWidth: 300
|
|
||||||
fillMode: Image.PreserveAspectFit
|
|
||||||
source: AppIcons.loginImage
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -35,6 +35,8 @@ LoginLayout {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
centerContent: LoginForm {}
|
centerContent: LoginForm {
|
||||||
|
onUseSIPButtonClicked: root.useSIPButtonClicked()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue