From a78c3683679fef38658a04f2a489ad9635867495 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Tue, 7 Jul 2020 16:11:18 +0200 Subject: [PATCH] [calamares] Tweak default QML sidebar - make the rectangles slightly larger - align text to center of the rectangle - make the rectangle fill out the column; without this, the width would collapse back to 0 after a change in the model, which would draw 0-width rectangles. FIXES #1453 --- src/calamares/calamares-sidebar.qml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/calamares/calamares-sidebar.qml b/src/calamares/calamares-sidebar.qml index ee75c22c8..85d1d506d 100644 --- a/src/calamares/calamares-sidebar.qml +++ b/src/calamares/calamares-sidebar.qml @@ -7,6 +7,7 @@ import QtQuick.Layouts 1.3 Rectangle { id: sideBar; color: Branding.styleString( Branding.SidebarBackground ); + anchors.fill: parent; ColumnLayout { anchors.fill: parent; @@ -27,17 +28,17 @@ Rectangle { Repeater { model: ViewManager Rectangle { - Layout.leftMargin: 12; - width: parent.width - 24; + Layout.leftMargin: 6; + Layout.rightMargin: 6; + Layout.fillWidth: true; height: 35; radius: 6; - color: Branding.styleString( index == ViewManager.currentStepIndex ? Branding.SidebarTextHighlight : Branding.SidebarBackground ); + color: Branding.styleString( index == ViewManager.currentStepIndex ? Branding.SidebarBackgroundSelected : Branding.SidebarBackground ); Text { anchors.verticalCenter: parent.verticalCenter; anchors.horizontalCenter: parent.horizontalCenter; - x: parent.x + 12; - color: Branding.styleString( index == ViewManager.currentStepIndex ? Branding.SidebarTextSelect : Branding.SidebarText ); + color: Branding.styleString( index == ViewManager.currentStepIndex ? Branding.SidebarTextSelected : Branding.SidebarText ); text: display; } }