calamares: add pretty navigation bar as well

This commit is contained in:
Harald Sitter
2024-03-18 15:50:49 +01:00
parent 8b0d08ce78
commit 2d72217424
3 changed files with 87 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
// SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
// SPDX-FileCopyrightText: 2024 Harald Sitter <sitter@kde.org>
import QtQuick
import QtQuick.Layouts
import QtQuick.Controls as QQC
import org.kde.kirigami as Kirigami
import io.calamares.ui as Calamares
RowLayout {
spacing: Kirigami.Units.smallSpacing
QQC.Button {
action: Kirigami.Action {
enabled: Calamares.ViewManager.quitEnabled
visible: Calamares.ViewManager.quitVisible
text: Calamares.ViewManager.quitLabel
icon.name: Calamares.ViewManager.quitIcon
onTriggered: Calamares.ViewManager.quit()
}
}
Item { Layout.fillWidth: true }
QQC.Button {
action: Kirigami.Action {
enabled: Calamares.ViewManager.backEnabled
text: Calamares.ViewManager.backLabel
icon.name: Calamares.ViewManager.backIcon
onTriggered: Calamares.ViewManager.back()
}
}
QQC.Button {
action: Kirigami.Action {
enabled: Calamares.ViewManager.nextEnabled
text: Calamares.ViewManager.nextLabel
icon.name: Calamares.ViewManager.nextIcon
onTriggered: Calamares.ViewManager.next()
}
}
}

View File

@@ -19,6 +19,7 @@ images:
productWelcome: "konqi-kde-hi.png"
sidebar: qml,top
navigation: qml,bottom
slideshow: "/calamares/slides/index.qml"
slideshowAPI: 2

View File

@@ -0,0 +1,42 @@
// SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
// SPDX-FileCopyrightText: 2024 Harald Sitter <sitter@kde.org>
import QtQuick
import QtQuick.Layouts
import QtQuick.Controls as QQC
import org.kde.kirigami as Kirigami
import io.calamares.ui as Calamares
Item {
height: header.implicitHeight + 9 // the +9 is anyone's guess, calamares' sizing is all sorts of wonky
Kirigami.Theme.colorSet: Kirigami.Theme.Header
Kirigami.Theme.inherit: false
Rectangle {
anchors.fill: parent
color: Kirigami.Theme.backgroundColor
}
ColumnLayout {
id: header
anchors.left: parent.left
anchors.right: parent.right
Kirigami.Separator {
Layout.fillWidth: true
}
Kirigami.AbstractApplicationHeader {
Layout.fillWidth: true
separatorVisible: false // We want the separator above so we'll place it via layout
contentItem: FooterBar {
anchors.left: parent.left
anchors.right: parent.right
anchors.margins: Kirigami.Units.smallSpacing
}
}
}
}