Fix window/content sizes for EditAccount page

This commit is contained in:
miruka 2019-07-18 23:59:05 -04:00
parent 28b6114218
commit a3e2233391
5 changed files with 4 additions and 4 deletions

View File

@ -26,7 +26,7 @@ HPage {
Layout.maximumWidth: Math.min(parent.width, 640) Layout.maximumWidth: Math.min(parent.width, 640)
Layout.preferredWidth: Layout.preferredWidth:
window.isWide ? parent.width : avatarPreferredSize pageStack.isWide ? parent.width : avatarPreferredSize
Layout.preferredHeight: childrenRect.height Layout.preferredHeight: childrenRect.height

View File

@ -45,7 +45,7 @@ HGridLayout {
} }
columns: 2 columns: 2
flow: window.isWide ? GridLayout.LeftToRight : GridLayout.TopToBottom flow: pageStack.isWide ? GridLayout.LeftToRight : GridLayout.TopToBottom
rowSpacing: currentSpacing rowSpacing: currentSpacing
Component.onCompleted: nameField.field.forceActiveFocus() Component.onCompleted: nameField.field.forceActiveFocus()

View File

@ -9,7 +9,7 @@ QtObject {
property int minimumSupportedWidth: 240 property int minimumSupportedWidth: 240
property int minimumSupportedHeight: 120 property int minimumSupportedHeight: 120
property int isWideAbove: 599 property int contentIsWideAbove: 439
property int minimumSupportedWidthPlusSpacing: 240 + spacing * 2 property int minimumSupportedWidthPlusSpacing: 240 + spacing * 2
property int minimumSupportedHeightPlusSpacing: 120 + spacing * 2 property int minimumSupportedHeightPlusSpacing: 120 + spacing * 2

View File

@ -58,6 +58,7 @@ Item {
StackView { StackView {
id: pageStack id: pageStack
property bool isWide: width > theme.contentIsWideAbove
function showPage(name, properties={}) { function showPage(name, properties={}) {
pageStack.replace("Pages/" + name + ".qml", properties) pageStack.replace("Pages/" + name + ".qml", properties)

View File

@ -26,7 +26,6 @@ ApplicationWindow {
property bool debug: false property bool debug: false
property bool ready: false property bool ready: false
property bool isWide: width > theme.isWideAbove
// Note: window.settingsChanged() must be called manually // Note: window.settingsChanged() must be called manually
property var settings: ({}) property var settings: ({})