diff --git a/etc/calamares/branding/parchlinux/ImageSlide.qml b/etc/calamares/branding/parchlinux/ImageSlide.qml index 1b7dc30..7697426 100644 --- a/etc/calamares/branding/parchlinux/ImageSlide.qml +++ b/etc/calamares/branding/parchlinux/ImageSlide.qml @@ -1,23 +1,64 @@ +/* === This file is part of Calamares Extensions - === + * + * SPDX-FileCopyrightText: 2021 Adriaan de Groot + * SPDX-License-Identifier: BSD-2-Clause + */ +/* An *ImageSlide* is a *Slide* (it offers the API that *Presentation* + * expects) while displaying only a single image. This is useful + * for presentations that are all images, with no interaction or text. + */ import QtQuick 2.5 +/* To use an *ImageSlide*, instantiate it inside your *Presentation* + * and set the *src* property to a path to an image file in a supported + * format. Relative paths are ok. + */ Item { id: imageslide + /* Slides should be non-visible at the start; the *Presentation* + * handles visibility (so that one slide at a time is visible). + */ visible: false - + /* Make this item fill up the parent, so that alignment of the + * image (below) works out to "middle of the parent". + */ anchors.fill: parent + /* The *Presentation* manages visibility of children that have + * attribute *isSlide* and *isSlide* is set to *true*. Other + * children are ignored, so we need to set this so that the + * *ImageSlide* elements are treated like slides. + */ property bool isSlide: true; - + /* The *Presentation* allows slides to have notes, so just leave + * an empty string here. + */ property string notes; + + /* This is the important property for *ImageSlide*: the path to the + * image to display. When instantiating *ImageSlide*, set this for + * each instance. Relative paths are ok. + */ property string src; + /* The image itself. It has fixed sizes (300x150px). You could set + * an aspect ratio here (e.g. `height: width / 2`) as well. + * + * This binds the image source (filename) to the string *src* + * in the *ImageSlide* element, for convenience in setting things + * up in the overall slideshow. If you want to make width and + * height configurable, add a property above and then bind to + * them from the Image element. + */ Image { id: image source: src + width: 1280 + height: 720 anchors.centerIn: parent } } diff --git a/etc/calamares/branding/parchlinux/Map.qml b/etc/calamares/branding/parchlinux/Map.qml new file mode 100644 index 0000000..5972b5c --- /dev/null +++ b/etc/calamares/branding/parchlinux/Map.qml @@ -0,0 +1,269 @@ +/* === This file is part of Calamares - === + * + * SPDX-FileCopyrightText: 2020 Anke Boersma + * SPDX-License-Identifier: GPL-3.0-or-later + * + * Calamares is Free Software: see the License-Identifier above. + * + */ + +import QtQuick 2.10 +import QtQuick.Controls 2.10 +import QtQuick.Window 2.14 +import QtQuick.Layouts 1.3 + +import org.kde.kirigami 2.7 as Kirigami + +import QtLocation 5.14 +import QtPositioning 5.14 + +Column { + width: parent.width + + // These are used by the map query to initially center the + // map on the user's likely location. They are updated by + // getIp() which does a more accurate GeoIP lookup than + // the default one in Calamares + property var cityName: "" + property var countryName: "" + + /* This is an extra GeoIP lookup, which will find better-accuracy + * location data for the user's IP, and then sets the current timezone + * and map location. Call it from Component.onCompleted so that + * it happens "on time" before the page is shown. + */ + function getIpOnline() { + var xhr = new XMLHttpRequest + + xhr.onreadystatechange = function() { + if (xhr.readyState === XMLHttpRequest.DONE) { + var responseJSON = JSON.parse(xhr.responseText) + var tz = responseJSON.timezone + var ct = responseJSON.city + var cy = responseJSON.country + + cityName = ct + countryName = cy + + config.setCurrentLocation(tz) + } + } + + // Define the target of the request + xhr.open("GET", "https://get.geojs.io/v1/ip/geo.json") + // Execute the request + xhr.send() + } + + /* This is an "offline" GeoIP lookup -- it just follows what + * Calamares itself has figured out with its GeoIP or configuration. + * Call it from the **Component** onActivate() -- in localeq.qml -- + * so it happens as the page is shown. + */ + function getIpOffline() { + cityName = config.currentLocation.zone + countryName = config.currentLocation.countryCode + } + + /* This is an **accurate** TZ lookup method: it queries an + * online service for the TZ at the given coordinates. It + * requires an internet connection, though, and the distribution + * will need to have an account with geonames to not hit the + * daily query limit. + * + * See below, in MouseArea, for calling the right method. + */ + function getTzOnline() { + var xhr = new XMLHttpRequest + var latC = map.center.latitude + var lonC = map.center.longitude + + xhr.onreadystatechange = function() { + if (xhr.readyState === XMLHttpRequest.DONE) { + var responseJSON = JSON.parse(xhr.responseText) + var tz2 = responseJSON.timezoneId + + config.setCurrentLocation(tz2) + } + } + + console.log("Online lookup", latC, lonC) + // Needs to move to localeq.conf, each distribution will need their own account + xhr.open("GET", "http://api.geonames.org/timezoneJSON?lat=" + latC + "&lng=" + lonC + "&username=SOME_USERNAME") + xhr.send() + } + + /* This is a quick TZ lookup method: it uses the existing + * Calamares "closest TZ" code, which has lots of caveats. + * + * See below, in MouseArea, for calling the right method. + */ + function getTzOffline() { + var latC = map.center.latitude + var lonC = map.center.longitude + var tz = config.zonesModel.lookup(latC, lonC) + console.log("Offline lookup", latC, lonC) + config.setCurrentLocation(tz.region, tz.zone) + } + + Rectangle { + width: parent.width + height: parent.height / 1.28 + + Plugin { + id: mapPlugin + name: "esri" // "esri", "here", "itemsoverlay", "mapbox", "mapboxgl", "osm" + } + + Map { + id: map + anchors.fill: parent + plugin: mapPlugin + activeMapType: supportedMapTypes[0] + //might be desirable to set zoom level configurable? + zoomLevel: 5 + bearing: 0 + tilt: 0 + copyrightsVisible : true + fieldOfView : 0 + + GeocodeModel { + id: geocodeModel + plugin: mapPlugin + autoUpdate: true + query: Address { + id: address + city: cityName + country: countryName + } + + onLocationsChanged: { + if (count == 1) { + map.center.latitude = get(0).coordinate.latitude + map.center.longitude = get(0).coordinate.longitude + } + } + } + + MapQuickItem { + id: marker + anchorPoint.x: image.width/4 + anchorPoint.y: image.height + coordinate: QtPositioning.coordinate( + map.center.latitude, + map.center.longitude) + //coordinate: QtPositioning.coordinate(40.730610, -73.935242) // New York + + sourceItem: Image { + id: image + width: 32 + height: 32 + source: "img/pin.svg" + } + } + + MouseArea { + acceptedButtons: Qt.LeftButton + anchors.fill: map + hoverEnabled: true + property var coordinate: map.toCoordinate(Qt.point(mouseX, mouseY)) + Label { + x: parent.mouseX - width -5 + y: parent.mouseY - height - 5 + text: "%1, %2".arg( + parent.coordinate.latitude).arg(parent.coordinate.longitude) + } + + onClicked: { + marker.coordinate = coordinate + map.center.latitude = coordinate.latitude + map.center.longitude = coordinate.longitude + + // Pick a TZ lookup method here (quick:offline, accurate:online) + getTzOffline(); + } + } + } + + Column { + anchors.bottom: parent.bottom + anchors.right: parent.right + anchors.bottomMargin: 5 + anchors.rightMargin: 10 + + MouseArea { + width: 32 + height:32 + cursorShape: Qt.PointingHandCursor + Image { + source: "img/plus.png" + anchors.centerIn: parent + width: 36 + height: 36 + } + + onClicked: map.zoomLevel++ + } + + MouseArea { + width: 32 + height:32 + cursorShape: Qt.PointingHandCursor + Image { + source: "img/minus.png" + anchors.centerIn: parent + width: 32 + height: 32 + } + + onClicked: map.zoomLevel-- + } + } + } + + Rectangle { + width: parent.width + height: 100 + anchors.horizontalCenter: parent.horizontalCenter + + Item { + id: location + Kirigami.Theme.inherit: false + Kirigami.Theme.colorSet: Kirigami.Theme.Complementary + anchors.horizontalCenter: parent.horizontalCenter + + Rectangle { + anchors.centerIn: parent + width: 300 + height: 30 + color: Kirigami.Theme.backgroundColor + + Text { + id: tzText + text: qsTr("Timezone: %1").arg(config.currentTimezoneName) + color: Kirigami.Theme.textColor + anchors.centerIn: parent + } + + /* If you want an extra (and accurate) GeoIP lookup, + * enable this one and disable the offline lookup in + * onActivate(). + Component.onCompleted: getIpOnline(); + */ + } + } + + Text { + anchors.top: location.bottom + anchors.topMargin: 20 + padding: 10 + width: parent.width + wrapMode: Text.WordWrap + horizontalAlignment: Text.AlignHCenter + Kirigami.Theme.backgroundColor: Kirigami.Theme.backgroundColor + text: qsTr("Please select your preferred location on the map so the installer can suggest the locale + and timezone settings for you. You can fine-tune the suggested settings below. Search the map by dragging + to move and using the +/- buttons to zoom in/out or use mouse scrolling for zooming.") + } + } +} diff --git a/etc/calamares/branding/parchlinux/Offline.qml b/etc/calamares/branding/parchlinux/Offline.qml new file mode 100644 index 0000000..e5e6b31 --- /dev/null +++ b/etc/calamares/branding/parchlinux/Offline.qml @@ -0,0 +1,236 @@ +/* === This file is part of Calamares - === + * + * SPDX-FileCopyrightText: 2020-2021 Anke Boersma + * SPDX-License-Identifier: GPL-3.0-or-later + * + * Calamares is Free Software: see the License-Identifier above. + * + */ + +import io.calamares.core 1.0 +import io.calamares.ui 1.0 + +import QtQuick 2.10 +import QtQuick.Controls 2.10 +import QtQuick.Window 2.14 +import QtQuick.Layouts 1.3 + +import org.kde.kirigami 2.7 as Kirigami + +Page { + width: 800 //parent.width + height: 500 + + id: control + property string currentRegion + property string currentZone + + StackView { + id: stack + anchors.fill: parent + clip: true + + initialItem: Item { + + Label { + + id: region + anchors.horizontalCenter: parent.horizontalCenter + color: Kirigami.Theme.textColor + horizontalAlignment: Text.AlignCenter + text: qsTr("Select your preferred Region, or use the default settings.") + } + + ListView { + + id: list + ScrollBar.vertical: ScrollBar { + active: true + } + + width: parent.width / 2 + height: parent.height / 1.5 + anchors.centerIn: parent + anchors.verticalCenterOffset: -30 + focus: true + clip: true + boundsBehavior: Flickable.StopAtBounds + spacing: 2 + + Rectangle { + + z: parent.z - 1 + anchors.fill: parent + color: "#BDC3C7" + radius: 5 + opacity: 0.7 + } + + model: config.regionModel + currentIndex: -1 + delegate: ItemDelegate { + + hoverEnabled: true + width: parent.width + highlighted: ListView.isCurrentItem + + Label { + + text: model.name + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + width: parent.width + height: 30 + color: highlighted ? Kirigami.Theme.highlightedTextColor : Kirigami.Theme.textColor + + background: Rectangle { + + color: highlighted || hovered ? Kirigami.Theme.highlightColor : "white" //Kirigami.Theme.backgroundColor + opacity: highlighted || hovered ? 0.5 : 0.3 + } + } + + onClicked: { + + list.currentIndex = index + control.currentRegion = model.name + config.regionalZonesModel.region = control.currentRegion + tztext.text = qsTr("Timezone: %1").arg(config.currentTimezoneName) + stack.push(zoneView) + } + } + } + } + + Component { + id: zoneView + + Item { + + Label { + + id: zone + anchors.horizontalCenter: parent.horizontalCenter + color: Kirigami.Theme.textColor + text: qsTr("Select your preferred Zone within your Region.") + } + + ListView { + + id: list2 + ScrollBar.vertical: ScrollBar { + active: true + } + + width: parent.width / 2 + height: parent.height / 1.5 + anchors.centerIn: parent + anchors.verticalCenterOffset: -30 + focus: true + clip: true + boundsBehavior: Flickable.StopAtBounds + spacing: 2 + + Rectangle { + + z: parent.z - 1 + anchors.fill: parent + color: "#BDC3C7" + radius: 5 + opacity: 0.7 + } + + model: config.regionalZonesModel + currentIndex : -1 + delegate: ItemDelegate { + + hoverEnabled: true + width: parent.width + highlighted: ListView.isCurrentItem + + Label { + + text: model.name + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + width: parent.width + height: 30 + color: highlighted ? Kirigami.Theme.highlightedTextColor : Kirigami.Theme.textColor + + background: Rectangle { + + color: highlighted || hovered ? Kirigami.Theme.highlightColor : "white" //Kirigami.Theme.backgroundColor + opacity: highlighted || hovered ? 0.5 : 0.3 + } + } + + onClicked: { + + list2.currentIndex = index + list2.positionViewAtIndex(index, ListView.Center) + control.currentZone = model.name + config.setCurrentLocation(control.currentRegion, control.currentZone) + tztext.text = qsTr("Timezone: %1").arg(config.currentTimezoneName) + } + } + } + + Button { + + Layout.fillWidth: true + anchors.verticalCenter: parent.verticalCenter + anchors.verticalCenterOffset: -30 + anchors.left: parent.left + anchors.leftMargin: parent.width / 15 + icon.name: "go-previous" + text: qsTr("Zones") + onClicked: stack.pop() + } + } + } + } + + Rectangle { + + width: parent.width + height: 60 + anchors.horizontalCenter: parent.horizontalCenter + anchors.bottom: parent.bottom + + Item { + + id: location + Kirigami.Theme.inherit: false + Kirigami.Theme.colorSet: Kirigami.Theme.Complementary + anchors.horizontalCenter: parent.horizontalCenter + + Rectangle { + + anchors.centerIn: parent + width: 300 + height: 30 + color: Kirigami.Theme.backgroundColor + + Text { + + id: tztext + text: qsTr("Timezone: %1").arg(config.currentTimezoneName) + color: Kirigami.Theme.textColor + anchors.centerIn: parent + } + } + } + + Text { + + anchors.top: location.bottom + anchors.topMargin: 20 + padding: 10 + width: parent.width + wrapMode: Text.WordWrap + horizontalAlignment: Text.AlignHCenter + Kirigami.Theme.backgroundColor: Kirigami.Theme.backgroundColor + text: qsTr("You can fine-tune Language and Locale settings below.") + } + } +} diff --git a/etc/calamares/branding/parchlinux/Requirements.qml b/etc/calamares/branding/parchlinux/Requirements.qml new file mode 100644 index 0000000..159d884 --- /dev/null +++ b/etc/calamares/branding/parchlinux/Requirements.qml @@ -0,0 +1,103 @@ +/* === This file is part of Calamares - === + * + * SPDX-FileCopyrightText: 2020 Anke Boersma + * SPDX-FileCopyrightText: 2020 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later + * + * Calamares is Free Software: see the License-Identifier above. + * + */ + +import io.calamares.core 1.0 +import io.calamares.ui 1.0 + +import QtQuick 2.7 +import QtQuick.Controls 2.2 +import QtQuick.Layouts 1.3 +import org.kde.kirigami 2.7 as Kirigami + +Rectangle { + focus: true + Kirigami.Theme.backgroundColor: Kirigami.Theme.backgroundColor + anchors.fill: parent + anchors.topMargin: 50 + + TextArea { + id: required + anchors.horizontalCenter: parent.horizontalCenter + anchors.top: parent.top + anchors.topMargin: 1 + horizontalAlignment: TextEdit.AlignHCenter + width: 640 + font.pointSize: 11 + textFormat: Text.RichText + antialiasing: true + activeFocusOnPress: false + wrapMode: Text.WordWrap + + property var requirementsText: qsTr("

This computer does not satisfy the minimum requirements for installing %1.
+ Installation cannot continue.

").arg(Branding.string(Branding.VersionedName)) + property var recommendationsText: qsTr("

This computer does not satisfy some of the recommended requirements for setting up %1.
+ Setup can continue, but some features might be disabled.

").arg(Branding.string(Branding.VersionedName)) + + text: config.requirementsModel.satisfiedMandatory ? recommendationsText : requirementsText + } + + Rectangle { + width: 640 + height: 360 + anchors.horizontalCenter: parent.horizontalCenter + anchors.top: required.bottom + anchors.topMargin: 5 + + Component { + id: requirementsDelegate + + Item { + width: 640 + height: 35 + visible: true + + Column { + anchors.centerIn: parent + + Rectangle { + implicitWidth: 640 + implicitHeight: 35 + // Colors and images based on the two satisfied-bools: + // - if satisfied, then green / ok + // - otherwise if mandatory, then red / stop + // - otherwise, then yellow / warning + border.color: satisfied ? "#228b22" : (mandatory ? "#ff0000" : "#ffa411") + color: satisfied ? "#f0fff0" : (mandatory ? "#ffc0cb" : "#ffefd5") + + Image { + anchors.verticalCenter: parent.verticalCenter + anchors.right: parent.right + anchors.margins: 20 + source: satisfied ? "qrc:/data/images/yes.svgz" : (mandatory ? "qrc:/data/images/no.svgz" : "qrc:/data/images/information.svgz") + } + + Text { + text: satisfied ? details : negatedText + anchors.centerIn: parent + font.pointSize: 11 + } + } + } + } + } + + ListView { + id: requirementsList + anchors.fill: parent + spacing: 5 + // This uses the filtered model, so that only unsatisfied + // requirements are ever shown. You could use *requirementsModel* + // to get all of them. + model: config.unsatisfiedRequirements + delegate: requirementsDelegate + } + } +} + diff --git a/etc/calamares/branding/parchlinux/about.qml b/etc/calamares/branding/parchlinux/about.qml new file mode 100644 index 0000000..73f2986 --- /dev/null +++ b/etc/calamares/branding/parchlinux/about.qml @@ -0,0 +1,101 @@ +/* === This file is part of Calamares - === + * + * SPDX-FileCopyrightText: 2020 2022 Anke Boersma + * SPDX-License-Identifier: GPL-3.0-or-later + * + * Calamares is Free Software: see the License-Identifier above. + * + */ + +import io.calamares.core 1.0 +import io.calamares.ui 1.0 + +import QtQuick 2.7 +import QtQuick.Controls 2.0 +import QtQuick.Layouts 1.3 +import QtQuick.Window 2.3 + +ApplicationWindow { + id: about + visible: true + width: 760 + height: 400 + title: qsTr("About Calamares") + + property var appName: "Calamares" + property var appVersion: "3.3 RC" + + Rectangle { + id: textArea + anchors.fill: parent + color: "#f2f2f2" + + Column { + id: column + anchors.centerIn: parent + + + Rectangle { + width: 560 + height: 250 + radius: 10 + border.width: 0 + + Text { + width: 400 + height: 250 + anchors.centerIn: parent + text: qsTr("

%1


+ %2
+ for %3


+ Copyright 2014-2017 Teo Mrnjavac <teo@kde.org>
+ Copyright 2017-2022 Adriaan de Groot <groot@kde.org>
+ Thanks to the Calamares team + and the KaOS + translators team.

+ Calamares + development is sponsored by
+ Blue Systems - + Liberating Software." ) + .arg(appName) + .arg(appVersion) + .arg(Branding.string(Branding.VersionedName)) + + onLinkActivated: Qt.openUrlExternally(link) + + MouseArea { + anchors.fill: parent + acceptedButtons: Qt.NoButton + cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor + } + + font.pointSize: 10 + anchors.verticalCenterOffset: 10 + anchors.horizontalCenterOffset: 40 + wrapMode: Text.WordWrap + } + + Image { + id: image + x: 8 + y: 12 + height: 100 + fillMode: Image.PreserveAspectFit + source: "squid.png" + } + + } + + } + + Button { + anchors.horizontalCenter: parent.horizontalCenter + anchors.bottom: parent.bottom + icon.name: "window-close" + text: qsTr("Close") + hoverEnabled: true + onClicked: about.close(); + } + } + +} diff --git a/etc/calamares/branding/parchlinux/branding.desc b/etc/calamares/branding/parchlinux/branding.desc index c3a055c..be7a656 100644 --- a/etc/calamares/branding/parchlinux/branding.desc +++ b/etc/calamares/branding/parchlinux/branding.desc @@ -5,12 +5,12 @@ welcomeStyleCalamares: false welcomeExpandingLogo: true -windowExpanding: fullscreen - +windowExpanding: noexpand +windowSize: 1280px,720px windowPlacement: center +#sidebar: qml,top sidebar: none - navigation: widget strings: @@ -28,10 +28,10 @@ images: productWelcome: "idioma.png" style: - sidebarBackground: "#FFFFFF" - sidebarText: "#292F34" - sidebarTextSelect: "#ffffff" - sidebarTextHighlight: "#2093d1" + SidebarBackground: "#282c34" + SidebarText: "#FFFFFF" + SidebarTextSelect: "#cc0000" + SidebarTextHighlight: "#000000" slideshow: "show.qml" diff --git a/etc/calamares/branding/parchlinux/show.qml b/etc/calamares/branding/parchlinux/show.qml index 0fa6a0f..f7943e7 100644 --- a/etc/calamares/branding/parchlinux/show.qml +++ b/etc/calamares/branding/parchlinux/show.qml @@ -1,53 +1,111 @@ +/* === This file is part of Calamares Extensions - === + * + * SPDX-FileCopyrightText: 2021 Adriaan de Groot + * SPDX-License-Identifier: BSD-2-Clause + */ + +/* This is a simple slideshow for use during the *exec* phase of + * installation, that displays a handful of slides. It uses + * the *Presentation* QML components -- this allows, for instance, + * notes to be added to slides, and for arrow navigation to be + * used. But at its core it's just a bunch of images, repeating. + * + * For this kind of limited functionality, it may be better to + * use the "plain images" slideshow format in Calamares, although + * then you don't have any say in how things are animated. + * + * This slideshow is written for *slideshowAPI* version 1, so in + * `branding.desc` set that appropriately. + */ -import QtQuick 2.0; -import calamares.slideshow 1.0; +import QtQuick 2.0 // Basic QML +import calamares.slideshow 1.0 // Calamares slideshow: Presentation import io.calamares.ui 1.0 // Calamares internals: Branding +/* *Presentation* comes from the pre-installed calamares.slideshow + * that comes with Calamares itself. See `Presentation.qml` in the + * Calamares repository for details and documentation. + * + * The important parts of presentation are: + * - it has a property *activatedInCalamares* which is set to *true* + * when the slideshow becomes visible, *false* afterwards. + * - it expects one or more children with a property *isSlide* + * set to *true*. + * - it has a function *goToNextSlide()* to do just that (where + * "slides" is the sequence of children that have property + * *isSlide* set to *true*. + * + */ Presentation { id: presentation + /* This timer ticks once per second (1000ms, set in *interval*) + * and calls *goToNextSlide()* each time. Note that it needs + * to know the *id* of the presentation, so keep *id* (above) + * matched with the function call. + * + * The timer starts when the presentation is activated; you could + * also set *running* to true, but that might cost extra resources. + */ Timer { - interval: 30000 + interval: 15000 running: presentation.activatedInCalamares repeat: true onTriggered: presentation.goToNextSlide() } + /* These functions are called when the presentation starts and + * ends, respectively. They could be used to start the timer, + * but that is done automatically through *activatedInCalamares*, + * so there's nothing **to** do. + * + * Leaving these functions out is fine, although Calamares will + * complain that they are missing, then. + */ function onActivate() { } function onLeave() { } + + /* A presentation is an Item: it has no visual appearance at all. + * Give it a background, which fills the whole area of the presentation. + * Setting *z* to a low value places this rectangle **behind** other + * things in the presentation -- which is correct for a background. + * + * This uses the background set in the styles section of `branding.desc`. + */ Rectangle { id: mybackground anchors.fill: parent - color: Branding.styleString(Branding.SidebarBackground) + color: "#282c34" z: -1 } + /* The *ImageSlide* is a component unique to this branding directory. + * The QML file `ImageSlide.qml` can be stored alongside `show.qml` + * and it will be loaded on-demand. See the documentation in that + * file for details, but it comes down to this: for each *ImageSlide*, + * set *src* to a suitable value (an image path in this directory) + * and that will be displayed. + */ ImageSlide { - src: "slide01.png" + src: "slide-01.png" } ImageSlide { - src: "slide02.png" + src: "slide-02.png" } ImageSlide { - src: "slide03.png" + src: "slide-03.png" } ImageSlide { - src: "slide04.png" + src: "slide-04.png" } ImageSlide { - src: "slide05.png" + src: "slide-05.png" } - - ImageSlide { - src: "slide06.png" - } - - } diff --git a/etc/calamares/branding/parchlinux/stylesheet-codes.qss b/etc/calamares/branding/parchlinux/stylesheet-codes.qss new file mode 100644 index 0000000..cde4f86 --- /dev/null +++ b/etc/calamares/branding/parchlinux/stylesheet-codes.qss @@ -0,0 +1,399 @@ +/* + +A branding component can ship a stylesheet (like this one) +which is applied to parts of the Calamares user-interface. +In principle, all parts can be styled through CSS. +Missing parts should be filed as issues. + +The IDs are based on the object names in the C++ code. +You can use the Debug Dialog to find out object names: + - Open the debug dialog + - Choose tab *Tools* + - Click *Widget Tree* button +The list of object names is printed in the log. + +Documentation for styling Qt Widgets through a stylesheet +can be found at + https://doc.qt.io/qt-5/stylesheet-examples.html + https://doc.qt.io/qt-5/stylesheet-reference.html +In Calamares, styling widget classes is supported (e.g. +using `QComboBox` as a selector). + +This example stylesheet has all the actual styling commented out. +The examples are not exhaustive. + +Use gammaray + +*/ + + +/* ########## MAIN APPLICATION WINDOW ########## */ + +#mainApp { + color: #a3aed2 +} + +#mainText{ + font : bold 16px; +} + +#sidebarApp { + +} + +#logoApp { +} + +#sidebarMenuApp { + padding: 3px; + background-color: #394260; +} + +QWidget { + font: 16px; +} + +QTextEdit, QListView { +} +QDialogButtonBox { +} +QAbstractSpinBox { +} +QListWidget::item:alternate { +} + +#view-button-back:hover { + color: #769FF0; +} +#view-button-next:hover { + color: #769FF0; +} +#view-button-cancel:hover { + color: #769FF0; +} + +#debugButton { + font: bold 8px; + color: #FFFFFF; +} +#debugButton:hover { + color: #769FF0; +} + +#aboutButton:hover { + color: #769FF0; +} +#donateButton:hover { + color: #769FF0; +} +#supportButton:hover { + color: #769FF0; +} +#knownIssuesButton:hover { + color: #769FF0; +} +#releaseNotesButton:hover { + color: #769FF0; +} + +/* ########## TOOLTIP ########## */ + +QToolTip { + background-color: #769FF0; + font : 16px; + color: white; + padding: 3px; + border: none; +} + +QPushButton { + font : 16px; +} + +QDialogButtonBox { + dialogbuttonbox-buttons-have-icons: 0; +} + +/* ########## SCROLL BAR ########## */ + +QScrollBar:vertical { + background: #efefef; + width: 20px; + margin: 38px 0 20px 0; +} + +QScrollBar::handle:vertical { + background: #769FF0; + max-height: 25px; +} + +QScrollBar::sub-line:vertical { + border: none; + background: none; + height: 20px; + subcontrol-position: top; + subcontrol-origin: margin; +} + +QScrollBar::add-line:vertical { + border: none; + background: none; + height: 20px; + subcontrol-position: bottom; + subcontrol-origin: margin; +} + +/* ########## QLIST VIEW ########## */ + +QListView { + font: 16px; +} + +QListView::item:alternate { + color: #769FF0; + color: white; +} + +QListView::item:!alternate:selected:active { + background: #769FF0; + color: white; +} + +QListView::item:selected:active { + background: #769FF0; + color: white; +} + +QListView::item:selected:!active { + background: #769FF0; + color: white; +} + +QListView::item:hover { + background: #769FF0; + color: white; +} + +QListView#listLayout::item:!alternate:selected:active { + background: #769FF0; + color: white; +} + +QListView#listVariant::item:!alternate:selected:active { + background: #769FF0; + color: white; +} + + + +/* ########## QLINE EDIT ########## */ + +QLineEdit#LE_TestKeyboard { + font: 16px; +} + +QLineEdit#m_passphraseLineEdit, QLineEdit#vgName, +QLineEdit#m_confirmLineEdit { + font: 16px; +} + +QLineEdit#textBoxUserVerifiedPassword, QLineEdit#textBoxVerifiedRootPassword { + font: 16px; +} + +QLineEdit#textBoxFullName, QLineEdit#textBoxLoginName, QLineEdit#textBoxHostName, +QLineEdit#textBoxUserPassword, QLineEdit#textBoxRootPassword { + font: 16px; +} + +#textBoxFullName, #textBoxLoginName, #textBoxHostName, #textBoxUserPassword, +#textBoxRootPassword, #textBoxAutoLogin, #vgName { + font: 16px; +} + +#textBoxUserVerifiedPassword, #textBoxVerifiedRootPassword, +#LE_TestKeyboard, #m_confirmLineEdit, #m_passphraseLineEdit { + font: 16px; +} + +/* ##########PARTITION ########## */ + +#partitionLabel { +} + +#partitionLabelsView { +} + +#CreatePartitionDialog { +} + +#partResizerWidget { + font: 16px; +} + +/* ########## PAGE_USERSETUP ########## */ + + #labelWhatIsYourName { + font: 16px; +} + #textBoxFullName { + font: 16px; +} + #labelFullName { + font: 16px; +} + #labelFullNameError { + font: 16px; +} + #username_label_2 { + font: 16px; +} + #textBoxLoginName { + font: 16px; +} + #labelUsername { + font: 16px; +} + #labelUsernameError { + font: 16px; +} + #hostname_label_2 { + font: 16px; +} + #textBoxHostName { + font: 16px; +} + #labelHostname { + font: 16px; +} + #labelHostnameError { + font: 16px; +} + #password_label_2 { + font: 16px; +} + #textBoxUserPassword { + font: 16px; +} + #textBoxUserVerifiedPassword { + font: 16px; +} + #labelUserPassword { + font: 16px; +} + #labelUserPasswordError { + font: 16px; +} + #checkBoxRequireStrongPassword { + font: 16px; +} + #checkBoxDoAutoLogin { + font: 16px; +} + #checkBoxReusePassword { + font: 16px; +} + #labelChooseRootPassword { + font: 16px; +} + #textBoxRootPassword { + font: 16px; +} + #textBoxVerifiedRootPassword { + font: 16px; +} + #labelRootPassword { + font: 16px; +} + #labelRootPasswordError { + font: 16px; +} + +/* ########## COMBO BOX ########## */ + +QComboBox { + font: 16px; +} + +QComboBox::item:selected { + background: #769FF0; + color: white; +} + +#mountPointComboBox::drop-down { + font: 16px; +} + +/* ########## SPIN BOX ########## */ + +QSpinBox { + font: 16px; +} + +QLineEdit { + font: 16px; +} + +/* ########## TREE VIEW ########## */ + +QTreeView { + font: 16px; + show-decoration-selected: 0; +} + +QTreeView::item { + padding: 2px; +} + +QTreeView::item:selected { + background: #769FF0; + font: bold; +} + +QTreeView::branch:has-siblings:!adjoins-item { +} +QTreeView::branch:has-siblings:adjoins-item { +} +QTreeView::branch:!has-children:!has-siblings:adjoins-item { +} +QTreeView::branch:has-children:!has-siblings:closed, +QTreeView::branch:closed:has-children:has-siblings { +} +QTreeView::branch:open:has-children:!has-siblings, +QTreeView::branch:open:has-children:has-siblings { +} + +/* ########## CHECK BOX ########## */ + +QCheckBox { +} +QCheckBox::indicator:unchecked { +} +QCheckBox::indicator:checked { +} +QItemSelectionModel::Select { +} + +/* ########## HEADER VIEW ########## */ + +QHeaderView::section { + font : 16px; +} + +/* ########## PROGRESS BAR ########## */ + +QProgressBar { + text-align: center; +} + +QProgressBar::chunk { + background-color: #769FF0; +} + +#debugButton { + font: bold 8px; + color: #394260; +} +#debugButton:hover { + color: #394260; +} diff --git a/etc/calamares/branding/parchlinux/stylesheet.qss b/etc/calamares/branding/parchlinux/stylesheet.qss index f0afe57..39e1293 100644 --- a/etc/calamares/branding/parchlinux/stylesheet.qss +++ b/etc/calamares/branding/parchlinux/stylesheet.qss @@ -1,253 +1,132 @@ - -/* ########## MAIN APPLICATION WINDOW ########## */ +/*** Main application window. + * + * The main application window has the sidebar, which in turn + * contains a logo and a list of items -- note that the list + * can **not** be styled, since it has its own custom C++ + * delegate code. + */ #mainApp { -} - -#mainText{ - font : bold 16px; + color: #a3aed2; + background-color: #1b1a26; } #sidebarApp { - + color: #a3aed2; + background-color: #1b1a26; +} +#logoApp { + background: none; } -#logoApp { -} +/*** Welcome module. + * + * There are plenty of parts, but the buttons are the most interesting + * ones (donate, release notes, ...). The little icon image can be + * styled through *qproperty-icon*, which is a little obscure. + * URLs can reference the QRC paths of the Calamares application + * or loaded via plugins or within the filesystem. There is no + * comprehensive list of available icons, though. + */ -#sidebarMenuApp { - padding: 0px; - background-color: none; -} +/*** Generic Widgets. + * + * You can style **all** widgets of a given class by selecting + * the class name. Some widgets have specialized sub-selectors. + */ QWidget { - font: 16px; -} - -QTextEdit, QListView { -} -QDialogButtonBox { -} -QAbstractSpinBox { -} -QListWidget::item:alternate { -} - - -#debugButton { - font: bold 8px; - color: #292F34; -} - - -/* ########## TOOLTIP ########## */ - -QPushButton { - font : 16px; -} - -QDialogButtonBox { - dialogbuttonbox-buttons-have-icons: 0; -} - -/* ########## QLIST VIEW ########## */ - -QListView { - font: 16px; -} - -/* ########## QLINE EDIT ########## */ - -QLineEdit#LE_TestKeyboard { - font: 16px; -} - -QLineEdit#m_passphraseLineEdit, QLineEdit#vgName, -QLineEdit#m_confirmLineEdit { - font: 16px; -} - -QLineEdit#textBoxUserVerifiedPassword, QLineEdit#textBoxVerifiedRootPassword { - font: 16px; -} - -QLineEdit#textBoxFullName, QLineEdit#textBoxLoginName, QLineEdit#textBoxHostName, -QLineEdit#textBoxUserPassword, QLineEdit#textBoxRootPassword { - font: 16px; -} - -#textBoxFullName, #textBoxLoginName, #textBoxHostName, #textBoxUserPassword, -#textBoxRootPassword, #textBoxAutoLogin, #vgName { - font: 16px; -} - -#textBoxUserVerifiedPassword, #textBoxVerifiedRootPassword, -#LE_TestKeyboard, #m_confirmLineEdit, #m_passphraseLineEdit { - font: 16px; -} - -/* ##########PARTITION ########## */ - -#partResizerWidget { - font: 16px; -} - -/* ########## PAGE_USERSETUP ########## */ - - #labelWhatIsYourName { - font: 16px; -} - #textBoxFullName { - font: 16px; -} - #labelFullName { - font: 16px; -} - #labelFullNameError { - font: 16px; -} - #username_label_2 { - font: 16px; -} - #textBoxLoginName { - font: 16px; -} - #labelUsername { - font: 16px; -} - #labelUsernameError { - font: 16px; -} - #hostname_label_2 { - font: 16px; -} - #textBoxHostName { - font: 16px; -} - #labelHostname { - font: 16px; -} - #labelHostnameError { - font: 16px; -} - #password_label_2 { - font: 16px; -} - #textBoxUserPassword { - font: 16px; -} - #textBoxUserVerifiedPassword { - font: 16px; -} - #labelUserPassword { - font: 16px; -} - #labelUserPasswordError { - font: 16px; -} - #checkBoxRequireStrongPassword { - font: 16px; -} - #checkBoxDoAutoLogin { - font: 16px; -} - #checkBoxReusePassword { - font: 16px; -} - #labelChooseRootPassword { - font: 16px; -} - #textBoxRootPassword { - font: 16px; -} - #textBoxVerifiedRootPassword { - font: 16px; -} - #labelRootPassword { - font: 16px; -} - #labelRootPasswordError { - font: 16px; -} - -/* ########## COMBO BOX ########## */ - -QComboBox { - font: 16px; -} - -#mountPointComboBox::drop-down { - font: 16px; -} - -/* ########## SPIN BOX ########## */ - -QSpinBox { - font: 16px; + font: 16px; + color: #769ff0; + background-color: #1b1a26; } QLineEdit { - font: 16px; + font: 16px; + color: #a3aed2; + background-color: #394260; } -/* ########## TREE VIEW ########## */ +QListView { + font: 16px; + color: #769ff0; + alternate-background-color: #769ff0; + background-color: #394260; +} + +QPushButton { + font: 16px; + color: #769ff0; + background-color: #1b1a26; + border-color: #394260; + border-width: 1px; +} + +QToolTip { + font: 16px; + color: #769ff0; + background-color: #212736; + border: none; +} QTreeView { - font: 16px; - show-decoration-selected: 0; + font: 16px; + color: #769ff0; + alternate-background-color: #769ff0; + background-color: #212736; } -QTreeView::item { - padding: 2px; +#layoutSelector { + font: 16px; + color: #a3aed2; + selection-color: #a3aed2; + background-color: #1b1a26; + selection-background-color: #1b1a26; } -QTreeView::branch:has-siblings:!adjoins-item { -} -QTreeView::branch:has-siblings:adjoins-item { -} -QTreeView::branch:!has-children:!has-siblings:adjoins-item { -} -QTreeView::branch:has-children:!has-siblings:closed, -QTreeView::branch:closed:has-children:has-siblings { -} -QTreeView::branch:open:has-children:!has-siblings, -QTreeView::branch:open:has-children:has-siblings { +#variantSelector { + font: 16px; + color: #a3aed2; + selection-color: #a3aed2; + background-color: #1b1a26; + selection-background-color: #1b1a26; } -/* ########## CHECK BOX ########## */ - -QCheckBox { -} -QCheckBox::indicator:unchecked { -} -QCheckBox::indicator:checked { -} -QItemSelectionModel::Select { +#scrollAreaWidgetContents { + color: #a3aed2; } -/* ########## HEADER VIEW ########## */ - -QHeaderView::section { - font : 16px; +#defineInfoLabel { + color: #a3aed2; } -#debugButton { - background-color: none; - font: 12px; - color: #edecf0; - height: 32px; - border: none; -} +/* +QPushButton#aboutButton { qproperty-icon: url(:/data/images/release.svg); } +#donateButton, +#supportButton, +#releaseNotesButton, +#knownIssuesButton { qproperty-icon: url(:/data/images/help.svg); } +*/ -#debugButton:hover { - color: #ff7f7f; -} +/*** Partitioning module. + * + * Many moving parts, which you will need to experiment with. + */ +/* +#bootInfoIcon { } +#bootInfoLable { } +#deviceInfoIcon { } +#partitionBarView { } +*/ -#aboutButton { - background-color: none; - font: 12px; - color: #292F34; - height: 32px; - border: none; -} +/*** Licensing module. + * + * The licensing module paints individual widgets for each of + * the licenses. The item can be collapsed or expanded. + */ + +/* +#licenseItem { } +#licenseItemFullText { } +*/ diff --git a/etc/calamares/modules/bootloader.conf b/etc/calamares/modules/bootloader.conf index 1ac9c9b..cedcc7c 100644 --- a/etc/calamares/modules/bootloader.conf +++ b/etc/calamares/modules/bootloader.conf @@ -1,5 +1,5 @@ # Possible options are 'grub', 'sb-shim' and 'systemd-boot'. -efiBootLoader: "grub" +efiBootLoader: "systemd-boot" kernelSearchPath: "/usr/lib/modules" #kernelName: "vmlinuz" @@ -21,4 +21,4 @@ installEFIFallback: false loaderEntries: - "timeout 5" - "console-mode auto" - - "reboot-for-bitlocker 1" + - "reboot-for-bitlocker 1" \ No newline at end of file diff --git a/etc/calamares/modules/machineid.conf b/etc/calamares/modules/machineid.conf deleted file mode 100644 index 987ef67..0000000 --- a/etc/calamares/modules/machineid.conf +++ /dev/null @@ -1,17 +0,0 @@ -# SPDX-FileCopyrightText: no -# SPDX-License-Identifier: CC0-1.0 -# -# Machine-ID and other random data on the target system. ---- - -systemd: true - -dbus: true - -dbus-symlink: true - -entropy-copy: false - -entropy-files: - - /var/lib/urandom/random-seed - - /var/lib/systemd/random-seed diff --git a/etc/calamares/modules/mount.conf b/etc/calamares/modules/mount.conf index dc0912a..5722380 100644 --- a/etc/calamares/modules/mount.conf +++ b/etc/calamares/modules/mount.conf @@ -4,6 +4,7 @@ # Mount filesystems in the target (generally, before treating the # target as a usable chroot / "live" system). --- + setSELinux: false extraMounts: @@ -47,48 +48,4 @@ mountOptions: - filesystem: btrfs options: [ noatime, compress=zstd ] - filesystem: btrfs_swap - options: [ noatime ] -setSELinux: false - -extraMounts: - - device: proc - fs: proc - mountPoint: /proc - - device: sys - fs: sysfs - mountPoint: /sys - - device: /dev - mountPoint: /dev - options: [ bind ] - - device: tmpfs - fs: tmpfs - mountPoint: /run - - device: /run/udev - mountPoint: /run/udev - options: [ bind ] - - device: efivarfs - fs: efivarfs - mountPoint: /sys/firmware/efi/efivars - efi: true - -btrfsSwapSubvol: /@swap - -btrfsSubvolumes: - - mountPoint: / - subvolume: /@ - - mountPoint: /home - subvolume: /@home - - mountPoint: /var/cache - subvolume: /@cache - - mountPoint: /var/log - subvolume: /@log - -mountOptions: - - filesystem: default - options: [ noatime ] - - filesystem: efi - options: [ fmask=0137, dmask=0027 ] - - filesystem: btrfs - options: [ noatime, compress=zstd ] - - filesystem: btrfs_swap - options: [ noatime ] + options: [ noatime ] \ No newline at end of file diff --git a/etc/calamares/modules/users.conf b/etc/calamares/modules/users.conf index 2d0c567..5a9820e 100644 --- a/etc/calamares/modules/users.conf +++ b/etc/calamares/modules/users.conf @@ -39,7 +39,7 @@ passwordRequirements: allowWeakPasswords: true -allowWeakPasswordsDefault: false +allowWeakPasswordsDefault: true user: shell: /bin/bash