From 92dafccf6daaba3517a61ae146a96b1abad9c713 Mon Sep 17 00:00:00 2001 From: Kostas Karmas Date: Fri, 9 Apr 2021 15:08:43 +0200 Subject: [PATCH] Fix margins in the WhatsNew pages CURA-8154 --- .../qml/WelcomePages/WhatsNewContent.qml | 41 ++++++++----------- 1 file changed, 17 insertions(+), 24 deletions(-) diff --git a/resources/qml/WelcomePages/WhatsNewContent.qml b/resources/qml/WelcomePages/WhatsNewContent.qml index 4a3afe66c1..ac0717eefc 100644 --- a/resources/qml/WelcomePages/WhatsNewContent.qml +++ b/resources/qml/WelcomePages/WhatsNewContent.qml @@ -31,23 +31,16 @@ Item renderType: Text.NativeRendering } - Item - { - id: topSpacer - anchors.top: titleLabel.bottom - height: UM.Theme.getSize("default_margin").height - width: UM.Theme.getSize("default_margin").width - } - Rectangle { anchors { - top: topSpacer.bottom + top: titleLabel.bottom + topMargin: UM.Theme.getSize("default_margin").width bottom: whatsNewDots.top + bottomMargin: UM.Theme.getSize("narrow_margin").width left: parent.left right: parent.right - margins: UM.Theme.getSize("default_margin").width * 2 } color: UM.Theme.getColor("viewport_overlay") @@ -59,7 +52,6 @@ Item anchors { top: parent.top - topMargin: UM.Theme.getSize("default_margin").width horizontalCenter: parent.horizontalCenter } height: parent.height @@ -69,12 +61,6 @@ Item Repeater { - anchors - { - top: parent.top - topMargin: UM.Theme.getSize("default_margin").width / 2 - horizontalCenter: parent.horizontalCenter - } model: manager.subpageCount @@ -82,6 +68,8 @@ Item { Layout.alignment: Qt.AlignHCenter color: UM.Theme.getColor("viewport_overlay") + width: whatsNewViewport.width + height: whatsNewViewport.height Image { @@ -89,12 +77,15 @@ Item anchors { - horizontalCenter: parent.horizontalCenter top: parent.top - topMargin: UM.Theme.getSize("default_margin").width + topMargin: UM.Theme.getSize("thick_margin").width + left: parent.left + leftMargin: UM.Theme.getSize("thick_margin").width + right: parent.right + rightMargin: UM.Theme.getSize("thick_margin").width } - width: Math.round(parent.width - (UM.Theme.getSize("default_margin").width * 2)) - height: Math.round((parent.height - UM.Theme.getSize("default_margin").height) * 0.75) + width: sourceSize.width + sourceSize.width: Math.round(parent.width - (UM.Theme.getSize("thick_margin").height * 2)) fillMode: Image.PreserveAspectFit source: manager.getSubpageImageSource(index) @@ -108,9 +99,10 @@ Item { top: subpageImage.bottom bottom: parent.bottom - horizontalCenter: parent.horizontalCenter + bottomMargin: UM.Theme.getSize("thick_margin").height + left: subpageImage.left + right: subpageImage.right } - width: Math.round(parent.width - (UM.Theme.getSize("default_margin").width * 2)) ScrollBar.horizontal.policy: ScrollBar.AlwaysOff @@ -139,7 +131,8 @@ Item anchors { - bottom: bottomSpacer.top + bottom: whatsNewNextButton.top + bottomMargin: UM.Theme.getSize("narrow_margin").height horizontalCenter: parent.horizontalCenter }