fix adaptative margins : set minimum margin
This commit is contained in:
parent
4cc1665279
commit
c6a2a5e479
5 changed files with 62 additions and 41 deletions
|
|
@ -52,7 +52,7 @@ LoginLayout {
|
||||||
RowLayout {
|
RowLayout {
|
||||||
visible: !SettingsCpp.assistantHideCreateAccount
|
visible: !SettingsCpp.assistantHideCreateAccount
|
||||||
spacing: Math.round(20 * DefaultStyle.dp)
|
spacing: Math.round(20 * DefaultStyle.dp)
|
||||||
Layout.rightMargin: Math.round((51 - ((51/(DefaultStyle.defaultWidth - mainWindow.minimumWidth))*(DefaultStyle.defaultWidth-mainWindow.width))) * DefaultStyle.dp)
|
Layout.rightMargin: Math.round(Math.max(10 * DefaultStyle.dp, (51 - ((51/(DefaultStyle.defaultWidth - mainWindow.minimumWidth))*(DefaultStyle.defaultWidth-mainWindow.width))) * DefaultStyle.dp))
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
Layout.rightMargin: Math.round(15 * DefaultStyle.dp)
|
Layout.rightMargin: Math.round(15 * DefaultStyle.dp)
|
||||||
|
|
|
||||||
|
|
@ -84,8 +84,13 @@ LoginLayout {
|
||||||
contentHeight: content.implicitHeight
|
contentHeight: content.implicitHeight
|
||||||
clip: true
|
clip: true
|
||||||
flickableDirection: Flickable.VerticalFlick
|
flickableDirection: Flickable.VerticalFlick
|
||||||
|
|
||||||
|
Control.ScrollBar.vertical: scrollbar
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: content
|
id: content
|
||||||
|
// rightMargin is negative margin
|
||||||
|
width: parent.width - scrollbar.width*2
|
||||||
spacing: Math.round(85 * DefaultStyle.dp)
|
spacing: Math.round(85 * DefaultStyle.dp)
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
spacing: 0
|
spacing: 0
|
||||||
|
|
@ -174,15 +179,19 @@ LoginLayout {
|
||||||
Component {
|
Component {
|
||||||
id: secondItem
|
id: secondItem
|
||||||
Flickable {
|
Flickable {
|
||||||
|
id: formFlickable
|
||||||
width: parent.width
|
width: parent.width
|
||||||
contentWidth: content.implicitWidth
|
contentWidth: content.implicitWidth
|
||||||
contentHeight: content.implicitHeight
|
contentHeight: content.implicitHeight
|
||||||
clip: true
|
clip: true
|
||||||
flickableDirection: Flickable.VerticalFlick
|
flickableDirection: Flickable.VerticalFlick
|
||||||
|
|
||||||
|
Control.ScrollBar.vertical: scrollbar
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: content
|
id: content
|
||||||
spacing: Math.round(2 * DefaultStyle.dp)
|
spacing: Math.round(2 * DefaultStyle.dp)
|
||||||
width: Math.round(361 * DefaultStyle.dp)
|
width: formFlickable.width - scrollbar.width*2
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
spacing: Math.round(8 * DefaultStyle.dp)
|
spacing: Math.round(8 * DefaultStyle.dp)
|
||||||
|
|
@ -248,7 +257,6 @@ LoginLayout {
|
||||||
KeyNavigation.down: transportCbox
|
KeyNavigation.down: transportCbox
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
FormItemLayout {
|
FormItemLayout {
|
||||||
//: "Transport"
|
//: "Transport"
|
||||||
label: qsTr("transport")
|
label: qsTr("transport")
|
||||||
|
|
@ -270,6 +278,7 @@ LoginLayout {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
TemporaryText {
|
TemporaryText {
|
||||||
id: errorText
|
id: errorText
|
||||||
|
|
@ -362,6 +371,8 @@ LoginLayout {
|
||||||
}
|
}
|
||||||
|
|
||||||
centerContent: [
|
centerContent: [
|
||||||
|
Item {
|
||||||
|
anchors.fill: parent
|
||||||
Control.StackView {
|
Control.StackView {
|
||||||
id: rootStackView
|
id: rootStackView
|
||||||
initialItem: SettingsCpp.assistantGoDirectlyToThirdPartySipAccountLogin ? secondItem : firstItem
|
initialItem: SettingsCpp.assistantGoDirectlyToThirdPartySipAccountLogin ? secondItem : firstItem
|
||||||
|
|
@ -370,6 +381,17 @@ LoginLayout {
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
anchors.leftMargin: Math.round(127 * DefaultStyle.dp)
|
anchors.leftMargin: Math.round(127 * DefaultStyle.dp)
|
||||||
width: Math.round(361 * DefaultStyle.dp)
|
width: Math.round(361 * DefaultStyle.dp)
|
||||||
|
}
|
||||||
|
ScrollBar {
|
||||||
|
id: scrollbar
|
||||||
|
z: 1
|
||||||
|
active: true
|
||||||
|
interactive: true
|
||||||
|
parent: rootStackView.currentItem
|
||||||
|
visible: parent.contentHeight > parent.height
|
||||||
|
policy: Control.ScrollBar.AsNeeded
|
||||||
|
anchors.rightMargin: -8 * DefaultStyle.dp
|
||||||
|
}
|
||||||
},
|
},
|
||||||
Image {
|
Image {
|
||||||
z: -1
|
z: -1
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,7 @@ LoginLayout {
|
||||||
},
|
},
|
||||||
RowLayout {
|
RowLayout {
|
||||||
spacing: Math.round(20 * DefaultStyle.dp)
|
spacing: Math.round(20 * DefaultStyle.dp)
|
||||||
Layout.rightMargin: Math.round((51 - ((51/(DefaultStyle.defaultWidth - mainWindow.minimumWidth))*(DefaultStyle.defaultWidth-mainWindow.width))) * DefaultStyle.dp)
|
Layout.rightMargin: Math.round(Math.max(10 * DefaultStyle.dp,(51 - ((51/(DefaultStyle.defaultWidth - mainWindow.minimumWidth))*(DefaultStyle.defaultWidth-mainWindow.width))) * DefaultStyle.dp))
|
||||||
Text {
|
Text {
|
||||||
Layout.rightMargin: Math.round(15 * DefaultStyle.dp)
|
Layout.rightMargin: Math.round(15 * DefaultStyle.dp)
|
||||||
color: DefaultStyle.main2_700
|
color: DefaultStyle.main2_700
|
||||||
|
|
@ -98,7 +98,7 @@ LoginLayout {
|
||||||
TabBar {
|
TabBar {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
id: bar
|
id: bar
|
||||||
Layout.rightMargin: Math.round((127 - ((127/(DefaultStyle.defaultWidth - mainWindow.minimumWidth))*(DefaultStyle.defaultWidth-mainWindow.width))) * DefaultStyle.dp)
|
Layout.rightMargin: Math.round(Math.max(5 * DefaultStyle.dp,(127 - ((127/(DefaultStyle.defaultWidth - mainWindow.minimumWidth))*(DefaultStyle.defaultWidth-mainWindow.width))) * DefaultStyle.dp))
|
||||||
// "S'inscrire avec un numéro de téléphone"
|
// "S'inscrire avec un numéro de téléphone"
|
||||||
model: [qsTr("assistant_account_register_with_phone_number"),
|
model: [qsTr("assistant_account_register_with_phone_number"),
|
||||||
// "S'inscrire avec un email"
|
// "S'inscrire avec un email"
|
||||||
|
|
|
||||||
|
|
@ -123,13 +123,12 @@ Rectangle {
|
||||||
}
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: contentLayout
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
spacing: 0
|
spacing: 0
|
||||||
RowLayout {
|
RowLayout {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.topMargin: Math.round((25 - ((25/(DefaultStyle.defaultHeight - mainWindow.minimumHeight))*(DefaultStyle.defaultHeight-mainWindow.height))) * DefaultStyle.dp)
|
Layout.topMargin: Math.round(Math.max(5 * DefaultStyle.dp,(25 - ((25/(DefaultStyle.defaultHeight - mainWindow.minimumHeight))*(DefaultStyle.defaultHeight-mainWindow.height))) * DefaultStyle.dp))
|
||||||
Layout.rightMargin: Math.round((42 - ((42/(DefaultStyle.defaultWidth - mainWindow.minimumWidth))*(DefaultStyle.defaultWidth-mainWindow.width))) * DefaultStyle.dp)
|
Layout.rightMargin: Math.round(Math.max(5 * DefaultStyle.dp,(42 - ((42/(DefaultStyle.defaultWidth - mainWindow.minimumWidth))*(DefaultStyle.defaultWidth-mainWindow.width))) * DefaultStyle.dp))
|
||||||
spacing: 0
|
spacing: 0
|
||||||
Item {
|
Item {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
@ -150,14 +149,14 @@ Rectangle {
|
||||||
RowLayout {
|
RowLayout {
|
||||||
id: titleLayout
|
id: titleLayout
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.topMargin: Math.round((40 - ((40/(DefaultStyle.defaultHeight - mainWindow.minimumHeight))*(DefaultStyle.defaultHeight-mainWindow.height))) * DefaultStyle.dp)
|
Layout.topMargin: Math.round(Math.max(10 * DefaultStyle.dp,(40 - ((40/(DefaultStyle.defaultHeight - mainWindow.minimumHeight))*(DefaultStyle.defaultHeight-mainWindow.height))) * DefaultStyle.dp))
|
||||||
spacing: 0
|
spacing: 0
|
||||||
}
|
}
|
||||||
Item {
|
Item {
|
||||||
id: centerLayout
|
id: centerLayout
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.topMargin: Math.round((70 - ((70/(DefaultStyle.defaultHeight - mainWindow.minimumHeight))*(DefaultStyle.defaultHeight-mainWindow.height))) * DefaultStyle.dp)
|
Layout.topMargin: Math.round(Math.max(15 * DefaultStyle.dp,(70 - ((70/(DefaultStyle.defaultHeight - mainWindow.minimumHeight))*(DefaultStyle.defaultHeight-mainWindow.height))) * DefaultStyle.dp))
|
||||||
Layout.alignment: Qt.AlignBottom
|
Layout.alignment: Qt.AlignBottom
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ AbstractWindow {
|
||||||
|
|
||||||
color: DefaultStyle.grey_0
|
color: DefaultStyle.grey_0
|
||||||
minimumWidth: Math.round(1020 * DefaultStyle.dp)
|
minimumWidth: Math.round(1020 * DefaultStyle.dp)
|
||||||
minimumHeight: Math.round(735 * DefaultStyle.dp)
|
minimumHeight: Math.round(700 * DefaultStyle.dp)
|
||||||
|
|
||||||
signal callCreated()
|
signal callCreated()
|
||||||
property var accountProxy
|
property var accountProxy
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue