diff --git a/app/gui/AppView.qml b/app/gui/AppView.qml index 42342b98..24c8895c 100644 --- a/app/gui/AppView.qml +++ b/app/gui/AppView.qml @@ -12,10 +12,10 @@ GridView { id: appGrid focus: true activeFocusOnTab: true - leftMargin: (parent.width % (cellWidth + rightMargin)) / 2 topMargin: 20 - rightMargin: 5 bottomMargin: 5 + leftMargin: contentHeight > cellHeight && parent.width > cellWidth ? (parent.width % cellWidth) / 2 : 10 + rightMargin: leftMargin cellWidth: 230; cellHeight: 297; function computerLost() @@ -268,11 +268,9 @@ GridView { parent: appGrid.parent anchors { - top: appGrid.top - left: appGrid.right - bottom: appGrid.bottom - - leftMargin: -10 + top: parent.top + right: parent.right + bottom: parent.bottom } } } diff --git a/app/gui/PcView.qml b/app/gui/PcView.qml index c4aa8e4b..a6c56ed7 100644 --- a/app/gui/PcView.qml +++ b/app/gui/PcView.qml @@ -12,11 +12,11 @@ GridView { id: pcGrid focus: true activeFocusOnTab: true - leftMargin: (parent.width % (cellWidth + rightMargin)) / 2 topMargin: 20 - rightMargin: 5 bottomMargin: 5 - cellWidth: 350; cellHeight: 350; + leftMargin: contentHeight > cellHeight && parent.width > cellWidth ? (parent.width % cellWidth) / 2 : 10 + rightMargin: leftMargin + cellWidth: 310; cellHeight: 350; objectName: "Computers" Component.onCompleted: { @@ -263,11 +263,9 @@ GridView { ScrollBar.vertical: ScrollBar { parent: pcGrid.parent anchors { - top: pcGrid.top - left: pcGrid.right - bottom: pcGrid.bottom - - leftMargin: -10 + top: parent.top + right: parent.right + bottom: parent.bottom } } }