Warning, /plasma-bigscreen/calamares-bigscreen-branding/bigscreen/calamares-sidebar.qml is written in an unsupported language. File is not indexed.

0001 /* Sample of QML progress tree.
0002 
0003    SPDX-FileCopyrightText: 2020 Adriaan de Groot <groot@kde.org>
0004    SPDX-FileCopyrightText: 2021 Anke Boersma <demm@kaosx.us>
0005    SPDX-License-Identifier: GPL-3.0-or-later
0006 
0007 
0008    The progress tree (actually a list) is generally "vertical" in layout,
0009    with the steps going "down", but it could also be a more compact
0010    horizontal layout with suitable branding settings.
0011 
0012    This example emulates the layout and size of the widgets progress tree.
0013 */
0014 import io.calamares.ui 1.0
0015 import io.calamares.core 1.0
0016 
0017 import QtQuick 2.3
0018 import QtQuick.Layouts 1.3
0019 
0020 Rectangle {
0021     id: sideBar;
0022     color: Branding.styleString( Branding.SidebarBackground );
0023     anchors.fill: parent;
0024 
0025     RowLayout {
0026         anchors.fill: parent;
0027         spacing: 0;
0028 
0029         Image {
0030             Layout.topMargin: 12;
0031             Layout.bottomMargin: 12;
0032             Layout.alignment: Qt.AlignHCenter | Qt.AlignTop
0033             id: logo;
0034             width: 80;
0035             height: width;  // square
0036             source: "file:/" + Branding.imagePath(Branding.ProductLogo);
0037             sourceSize.width: width;
0038             sourceSize.height: height;
0039         }
0040 
0041         Repeater {
0042             model: ViewManager
0043             Rectangle {
0044                 Layout.leftMargin: 6;
0045                 Layout.rightMargin: 6;
0046                 Layout.fillWidth: true;
0047                 height: 35;
0048                 radius: 6;
0049                 color: Branding.styleString( index == ViewManager.currentStepIndex ? Branding.SidebarBackgroundSelected : Branding.SidebarBackground );
0050 
0051                 Text {
0052                     anchors.verticalCenter: parent.verticalCenter;
0053                     anchors.horizontalCenter: parent.horizontalCenter;
0054                     color: Branding.styleString( index == ViewManager.currentStepIndex ? Branding.SidebarTextSelected : Branding.SidebarText );
0055                     text: display;
0056                 }
0057             }
0058         }
0059 
0060         Item {
0061             Layout.fillHeight: true;
0062         }
0063 
0064         Rectangle {
0065             Layout.fillWidth: true;
0066             height: 35
0067             Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom
0068             color: Branding.styleString( mouseArea.containsMouse ? Branding.SidebarTextHighlight : Branding.SidebarBackground);
0069             visible: debug.enabled
0070 
0071             MouseArea {
0072                 id: mouseArea
0073                 anchors.fill: parent;
0074                 cursorShape: Qt.PointingHandCursor
0075                 hoverEnabled: true
0076                 Text {
0077                     anchors.verticalCenter: parent.verticalCenter;
0078                     x: parent.x + 4;
0079                     text: qsTr("Show debug information")
0080                     color: Branding.styleString( mouseArea.containsMouse ? Branding.SidebarTextSelect : Branding.SidebarBackground );
0081                     font.pointSize : 9
0082                 }
0083 
0084                 onClicked: debug.toggle()
0085             }
0086         }
0087     }
0088 }