diff --git a/src/qml/Pages/EditAccount/EditAccount.qml b/src/qml/Pages/EditAccount/EditAccount.qml index 87246b7f..2c848eb1 100644 --- a/src/qml/Pages/EditAccount/EditAccount.qml +++ b/src/qml/Pages/EditAccount/EditAccount.qml @@ -26,7 +26,7 @@ HPage { Layout.maximumWidth: Math.min(parent.width, 640) Layout.preferredWidth: - window.isWide ? parent.width : avatarPreferredSize + pageStack.isWide ? parent.width : avatarPreferredSize Layout.preferredHeight: childrenRect.height diff --git a/src/qml/Pages/EditAccount/Profile.qml b/src/qml/Pages/EditAccount/Profile.qml index 48daff6b..7713de8c 100644 --- a/src/qml/Pages/EditAccount/Profile.qml +++ b/src/qml/Pages/EditAccount/Profile.qml @@ -45,7 +45,7 @@ HGridLayout { } columns: 2 - flow: window.isWide ? GridLayout.LeftToRight : GridLayout.TopToBottom + flow: pageStack.isWide ? GridLayout.LeftToRight : GridLayout.TopToBottom rowSpacing: currentSpacing Component.onCompleted: nameField.field.forceActiveFocus() diff --git a/src/qml/Theme.qml b/src/qml/Theme.qml index f945fa20..0c352d7c 100644 --- a/src/qml/Theme.qml +++ b/src/qml/Theme.qml @@ -9,7 +9,7 @@ QtObject { property int minimumSupportedWidth: 240 property int minimumSupportedHeight: 120 - property int isWideAbove: 599 + property int contentIsWideAbove: 439 property int minimumSupportedWidthPlusSpacing: 240 + spacing * 2 property int minimumSupportedHeightPlusSpacing: 120 + spacing * 2 diff --git a/src/qml/UI.qml b/src/qml/UI.qml index 582ca6eb..3cba8687 100644 --- a/src/qml/UI.qml +++ b/src/qml/UI.qml @@ -58,6 +58,7 @@ Item { StackView { id: pageStack + property bool isWide: width > theme.contentIsWideAbove function showPage(name, properties={}) { pageStack.replace("Pages/" + name + ".qml", properties) diff --git a/src/qml/Window.qml b/src/qml/Window.qml index 23b20c6d..174ae870 100644 --- a/src/qml/Window.qml +++ b/src/qml/Window.qml @@ -26,7 +26,6 @@ ApplicationWindow { property bool debug: false property bool ready: false - property bool isWide: width > theme.isWideAbove // Note: window.settingsChanged() must be called manually property var settings: ({})