[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
This commit is contained in:
parent
2b2a69631f
commit
a78c368367
@ -7,6 +7,7 @@ import QtQuick.Layouts 1.3
|
|||||||
Rectangle {
|
Rectangle {
|
||||||
id: sideBar;
|
id: sideBar;
|
||||||
color: Branding.styleString( Branding.SidebarBackground );
|
color: Branding.styleString( Branding.SidebarBackground );
|
||||||
|
anchors.fill: parent;
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
anchors.fill: parent;
|
anchors.fill: parent;
|
||||||
@ -27,17 +28,17 @@ Rectangle {
|
|||||||
Repeater {
|
Repeater {
|
||||||
model: ViewManager
|
model: ViewManager
|
||||||
Rectangle {
|
Rectangle {
|
||||||
Layout.leftMargin: 12;
|
Layout.leftMargin: 6;
|
||||||
width: parent.width - 24;
|
Layout.rightMargin: 6;
|
||||||
|
Layout.fillWidth: true;
|
||||||
height: 35;
|
height: 35;
|
||||||
radius: 6;
|
radius: 6;
|
||||||
color: Branding.styleString( index == ViewManager.currentStepIndex ? Branding.SidebarTextHighlight : Branding.SidebarBackground );
|
color: Branding.styleString( index == ViewManager.currentStepIndex ? Branding.SidebarBackgroundSelected : Branding.SidebarBackground );
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
anchors.verticalCenter: parent.verticalCenter;
|
anchors.verticalCenter: parent.verticalCenter;
|
||||||
anchors.horizontalCenter: parent.horizontalCenter;
|
anchors.horizontalCenter: parent.horizontalCenter;
|
||||||
x: parent.x + 12;
|
color: Branding.styleString( index == ViewManager.currentStepIndex ? Branding.SidebarTextSelected : Branding.SidebarText );
|
||||||
color: Branding.styleString( index == ViewManager.currentStepIndex ? Branding.SidebarTextSelect : Branding.SidebarText );
|
|
||||||
text: display;
|
text: display;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user