Merge branch 'calamares' of github.com:calamares/calamares into development
This commit is contained in:
commit
b08573a500
16
CHANGES-3.3
16
CHANGES-3.3
@ -12,12 +12,20 @@ the history of the 3.2 series (2018-05 - 2022-08).
|
||||
|
||||
This release contains contributions from (alphabetically by first name):
|
||||
- Adriaan de Groot
|
||||
- Anke Boersma
|
||||
|
||||
## Core ##
|
||||
- No core changes yet
|
||||
- Incompatible module-configuration changes, see #1438.
|
||||
- Branding entries use ${var} instead of @{var} for substitutions,
|
||||
in line with all the other substitution mechanisms used from C++
|
||||
core. See documentation in `branding.desc`.
|
||||
- Boost::Python requires at least version 1.72
|
||||
- KDE Frameworks must be version 5.58 or later
|
||||
|
||||
## Modules ##
|
||||
- No module changes yet
|
||||
- *dracut* added a configurable kernel name. (thanks Anke)
|
||||
- *localeq* moved to using Drawer instead of ComboBox in UI. (thanks Anke)
|
||||
- *keyboardq* moved to using Drawer instead of ComboBox in UI. (thanks Anke)
|
||||
|
||||
|
||||
# 3.3.0-alpha2 (2022-08-23)
|
||||
@ -61,6 +69,7 @@ This release contains contributions from (alphabetically by first name):
|
||||
# 3.3.0-pre-alpha (unreleased) #
|
||||
|
||||
This release contains contributions from (alphabetically by first name):
|
||||
- Anke Boersma
|
||||
- Anubhav Choudhary
|
||||
- Evan James
|
||||
- Vitor Lopes
|
||||
@ -74,9 +83,6 @@ Users (distributions) are **strongly** advised to use the tools
|
||||
for configuration validation (`ci/configvalidator.py`) to check
|
||||
that the distribution configuration files follow the current schema.
|
||||
|
||||
- 3.3.0-alpha2 (unreleased)
|
||||
Incompatible module-configuration changes, see #1438.
|
||||
|
||||
## Project ##
|
||||
- The C++ code in the project is now formatted with clang-format 12 or 13,
|
||||
with the coding-style as found in `.clang-format`; there are minor
|
||||
|
@ -164,7 +164,7 @@ set( _tx_incomplete eo es_PR gu ie ja-Hira kk kn lo lv mk ne_NP
|
||||
# See DEPENDENCIES section below.
|
||||
set(QT_VERSION 5.15.0)
|
||||
set(YAMLCPP_VERSION 0.5.1)
|
||||
set(ECM_VERSION 5.18)
|
||||
set(ECM_VERSION 5.58)
|
||||
set(PYTHONLIBS_VERSION 3.6)
|
||||
set(BOOSTPYTHON_VERSION 1.72.0)
|
||||
|
||||
@ -330,7 +330,7 @@ if(ECM_FOUND)
|
||||
include(KDEInstallDirs)
|
||||
endif()
|
||||
|
||||
find_package(KF5 QUIET COMPONENTS CoreAddons Crash)
|
||||
find_package(KF5 ${ECM_VERSION} QUIET COMPONENTS CoreAddons Crash)
|
||||
set_package_properties(
|
||||
KF5::CoreAddons
|
||||
PROPERTIES
|
||||
|
@ -109,7 +109,7 @@ navigation: widget
|
||||
#
|
||||
# These strings support substitution from /etc/os-release
|
||||
# if KDE Frameworks 5.58 are available at build-time. When
|
||||
# enabled, @{var-name} is replaced by the equivalent value
|
||||
# enabled, ${varname} is replaced by the equivalent value
|
||||
# from os-release. All the supported var-names are in all-caps,
|
||||
# and are listed on the FreeDesktop.org site,
|
||||
# https://www.freedesktop.org/software/systemd/man/os-release.html
|
||||
@ -121,7 +121,7 @@ navigation: widget
|
||||
# are visible as buttons there if the corresponding *show* keys
|
||||
# are set to "true" (they can also be overridden).
|
||||
strings:
|
||||
productName: "@{NAME}"
|
||||
productName: "${NAME}"
|
||||
shortProductName: Generic
|
||||
version: 2020.2 LTS
|
||||
shortVersion: 2020.2
|
||||
|
@ -259,7 +259,7 @@ Branding::Branding( const QString& brandingFilePath, QObject* parent )
|
||||
{ QStringLiteral( "VARIANT_ID" ), relInfo.variantId() },
|
||||
{ QStringLiteral( "LOGO" ), relInfo.logo() } } };
|
||||
auto expand = [ & ]( const QString& s ) -> QString
|
||||
{ return KMacroExpander::expandMacros( s, relMap, QLatin1Char( '@' ) ); };
|
||||
{ return KMacroExpander::expandMacros( s, relMap, QLatin1Char( '$' ) ); };
|
||||
#else
|
||||
auto expand = []( const QString& s ) -> QString { return s; };
|
||||
#endif
|
||||
|
10
src/modules/dracut/dracut.conf
Normal file
10
src/modules/dracut/dracut.conf
Normal file
@ -0,0 +1,10 @@
|
||||
# SPDX-FileCopyrightText: no
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
#
|
||||
# Run dracut(8) with an optional kernel name
|
||||
---
|
||||
# Dracut defaults to setting initramfs-<kernel-version>.img
|
||||
# If you want to specify another filename for the resulting image,
|
||||
# set a custom kernel name, including the path
|
||||
#
|
||||
# kernelName: /boot/initramfs-linux.img
|
9
src/modules/dracut/dracut.schema.yaml
Normal file
9
src/modules/dracut/dracut.schema.yaml
Normal file
@ -0,0 +1,9 @@
|
||||
# SPDX-FileCopyrightText: 2022 Anke Boersma <demm@kaosx.us>
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
---
|
||||
$schema: https://json-schema.org/schema#
|
||||
$id: https://calamares.io/schemas/dracut
|
||||
additionalProperties: false
|
||||
type: object
|
||||
properties:
|
||||
kernelName: { type: string }
|
@ -7,13 +7,14 @@
|
||||
# SPDX-FileCopyrightText: 2014 Teo Mrnjavac <teo@kde.org>
|
||||
# SPDX-FileCopyrightText: 2017 Alf Gaida <agaid@siduction.org>
|
||||
# SPDX-FileCopyrightText: 2019 Adriaan de Groot <groot@kde.org>
|
||||
# SPDX-FileCopyrightText: 2022 Anke Boersma <demm@kaosx.us>
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
#
|
||||
# Calamares is Free Software: see the License-Identifier above.
|
||||
#
|
||||
|
||||
import libcalamares
|
||||
from libcalamares.utils import target_env_call
|
||||
from libcalamares.utils import check_target_env_call
|
||||
|
||||
|
||||
import gettext
|
||||
@ -33,7 +34,12 @@ def run_dracut():
|
||||
|
||||
:return:
|
||||
"""
|
||||
return target_env_call(['dracut', '-f'])
|
||||
kernelName = libcalamares.job.configuration['kernelName']
|
||||
|
||||
if not kernelName:
|
||||
return check_target_env_call(['dracut', '-f'])
|
||||
else:
|
||||
return check_target_env_call(['dracut', '-f', '{}'.format(kernelName)])
|
||||
|
||||
|
||||
def run():
|
||||
@ -46,5 +52,5 @@ def run():
|
||||
return_code = run_dracut()
|
||||
|
||||
if return_code != 0:
|
||||
return ( _("Failed to run dracut on the target"),
|
||||
_("The exit code was {}").format(return_code) )
|
||||
return (_("Failed to run dracut on the target"),
|
||||
_("The exit code was {}").format(return_code))
|
||||
|
@ -25,6 +25,12 @@ Page {
|
||||
property string currentRegion
|
||||
property string currentZone
|
||||
|
||||
readonly property color backgroundColor: Kirigami.Theme.backgroundColor //"#F5F5F5"
|
||||
readonly property color backgroundLighterColor: "#ffffff"
|
||||
readonly property color highlightColor: Kirigami.Theme.highlightColor //"#3498DB"
|
||||
readonly property color textColor: Kirigami.Theme.textColor
|
||||
readonly property color highlightedTextColor: Kirigami.Theme.highlightedTextColor
|
||||
|
||||
StackView {
|
||||
id: stack
|
||||
anchors.fill: parent
|
||||
@ -36,7 +42,7 @@ Page {
|
||||
|
||||
id: region
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
color: Kirigami.Theme.textColor
|
||||
color: textColor
|
||||
horizontalAlignment: Text.AlignCenter
|
||||
text: qsTr("Select your preferred Region, or use the default settings.")
|
||||
}
|
||||
@ -61,18 +67,16 @@ Page {
|
||||
|
||||
z: parent.z - 1
|
||||
anchors.fill: parent
|
||||
color: "#BDC3C7"
|
||||
radius: 5
|
||||
opacity: 0.7
|
||||
color: backgroundLighterColor
|
||||
}
|
||||
|
||||
model: config.regionModel
|
||||
currentIndex: -1
|
||||
currentIndex: 1 // offline install, means locale from config
|
||||
delegate: ItemDelegate {
|
||||
|
||||
hoverEnabled: true
|
||||
width: parent.width
|
||||
height: 30
|
||||
height: 28
|
||||
highlighted: ListView.isCurrentItem
|
||||
|
||||
Label {
|
||||
@ -81,13 +85,13 @@ Page {
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
width: parent.width
|
||||
height: 30
|
||||
color: highlighted ? Kirigami.Theme.highlightedTextColor : Kirigami.Theme.textColor
|
||||
height: 28
|
||||
color: highlighted ? highlightedTextColor : textColor
|
||||
|
||||
background: Rectangle {
|
||||
|
||||
color: highlighted || hovered ? Kirigami.Theme.highlightColor : "white" //Kirigami.Theme.backgroundColor
|
||||
opacity: highlighted || hovered ? 0.5 : 0.3
|
||||
color: highlighted || hovered ? highlightColor : backgroundLighterColor
|
||||
opacity: highlighted || hovered ? 0.5 : 1
|
||||
}
|
||||
}
|
||||
|
||||
@ -112,7 +116,7 @@ Page {
|
||||
|
||||
id: zone
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
color: Kirigami.Theme.textColor
|
||||
color: textColor
|
||||
text: qsTr("Select your preferred Zone within your Region.")
|
||||
}
|
||||
|
||||
@ -136,18 +140,19 @@ Page {
|
||||
|
||||
z: parent.z - 1
|
||||
anchors.fill: parent
|
||||
color: "#BDC3C7"
|
||||
radius: 5
|
||||
opacity: 0.7
|
||||
color: backgroundLighterColor
|
||||
//radius: 5
|
||||
//opacity: 0.7
|
||||
}
|
||||
|
||||
model: config.regionalZonesModel
|
||||
currentIndex : -1
|
||||
currentIndex : 99 // index of New York
|
||||
Component.onCompleted: positionViewAtIndex(currentIndex, ListView.Center)
|
||||
delegate: ItemDelegate {
|
||||
|
||||
hoverEnabled: true
|
||||
width: parent.width
|
||||
height: 30
|
||||
height: 24
|
||||
highlighted: ListView.isCurrentItem
|
||||
|
||||
Label {
|
||||
@ -156,13 +161,13 @@ Page {
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
width: parent.width
|
||||
height: 30
|
||||
color: highlighted ? Kirigami.Theme.highlightedTextColor : Kirigami.Theme.textColor
|
||||
height: 24
|
||||
color: highlighted ? highlightedTextColor : textColor
|
||||
|
||||
background: Rectangle {
|
||||
|
||||
color: highlighted || hovered ? Kirigami.Theme.highlightColor : "white" //Kirigami.Theme.backgroundColor
|
||||
opacity: highlighted || hovered ? 0.5 : 0.3
|
||||
color: highlighted || hovered ? highlightColor : backgroundLighterColor
|
||||
opacity: highlighted || hovered ? 0.5 : 1
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,204 +0,0 @@
|
||||
/* === This file is part of Calamares - <https://calamares.io> ===
|
||||
*
|
||||
* SPDX-FileCopyrightText: 2020 - 2021 Anke Boersma <demm@kaosx.us>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is Free Software: see the License-Identifier above.
|
||||
*
|
||||
*/
|
||||
|
||||
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
|
||||
|
||||
Item {
|
||||
readonly property color backgroundColor: Kirigami.Theme.backgroundColor //"#F5F5F5"
|
||||
readonly property color headerBackgroundColor: Kirigami.Theme.alternateBackgroundColor //"#d3d3d3"
|
||||
readonly property color backgroundLighterColor: "#ffffff"
|
||||
readonly property color highlightColor: Kirigami.Theme.highlightColor //"#3498DB"
|
||||
readonly property color textColor: Kirigami.Theme.textColor
|
||||
readonly property color highlightedTextColor: Kirigami.Theme.highlightedTextColor
|
||||
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
focus: true
|
||||
|
||||
Rectangle {
|
||||
id: textArea
|
||||
x: 28
|
||||
y: 14
|
||||
anchors.fill: parent
|
||||
color: backgroundColor
|
||||
|
||||
Column {
|
||||
id: languages
|
||||
x: 130
|
||||
y: 40
|
||||
|
||||
Rectangle {
|
||||
width: 250
|
||||
height: 140
|
||||
color: headerBackgroundColor
|
||||
Text {
|
||||
anchors.top: parent.top
|
||||
width: 240
|
||||
wrapMode: Text.WordWrap
|
||||
text: qsTr("<h1>Languages</h1> </br>
|
||||
The system locale setting affects the language and character set for some command line user interface elements. The current setting is <strong>%1</strong>.").arg(config.currentLanguageCode)
|
||||
font.pointSize: 10
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
width: 250
|
||||
height: 300
|
||||
|
||||
ScrollView {
|
||||
id: scroll1
|
||||
anchors.fill: parent
|
||||
contentHeight: 800
|
||||
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
|
||||
|
||||
ListView {
|
||||
id: list1
|
||||
focus: true
|
||||
clip: true
|
||||
width: parent.width
|
||||
|
||||
model: config.supportedLocales
|
||||
|
||||
currentIndex: -1 //model.currentLanguageCodeIndex
|
||||
delegate: ItemDelegate {
|
||||
|
||||
hoverEnabled: true
|
||||
width: parent.width
|
||||
implicitHeight: 18
|
||||
highlighted: ListView.isCurrentItem
|
||||
Label {
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
width: parent.width
|
||||
height: 18
|
||||
color: highlighted ? highlightedTextColor : textColor
|
||||
text: modelData
|
||||
background: Rectangle {
|
||||
|
||||
color: highlighted || hovered ? highlightColor : backgroundLighterColor
|
||||
opacity: highlighted || hovered ? 0.5 : 0.9
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
hoverEnabled: true
|
||||
anchors.fill: parent
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: {
|
||||
list1.currentIndex = index
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
onCurrentItemChanged: { config.currentLanguageCode = model[currentIndex] } /* This works because model is a stringlist */
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Column {
|
||||
id: lc_numeric
|
||||
x: 430
|
||||
y: 40
|
||||
|
||||
Rectangle {
|
||||
width: 250
|
||||
height: 140
|
||||
color: headerBackgroundColor
|
||||
Text {
|
||||
anchors.top: parent.top
|
||||
width: 240
|
||||
wrapMode: Text.WordWrap
|
||||
text: qsTr("<h1>Locales</h1> </br>
|
||||
The system locale setting affects the numbers and dates format. The current setting is <strong>%1</strong>.").arg(config.currentLCCode)
|
||||
font.pointSize: 10
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
width: 250
|
||||
height: 300
|
||||
|
||||
ScrollView {
|
||||
id: scroll2
|
||||
anchors.fill: parent
|
||||
contentHeight: 800
|
||||
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
|
||||
|
||||
ListView {
|
||||
id: list2
|
||||
focus: true
|
||||
clip: true
|
||||
|
||||
model: config.supportedLocales
|
||||
|
||||
currentIndex: -1 //model.currentLCCodeIndex
|
||||
delegate: ItemDelegate {
|
||||
|
||||
hoverEnabled: true
|
||||
width: parent.width
|
||||
implicitHeight: 18
|
||||
highlighted: ListView.isCurrentItem
|
||||
Label {
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
width: parent.width
|
||||
height: 18
|
||||
color: highlighted ? highlightedTextColor : textColor
|
||||
text: modelData
|
||||
background: Rectangle {
|
||||
|
||||
color: highlighted || hovered ? highlightColor : backgroundLighterColor
|
||||
opacity: highlighted || hovered ? 0.5 : 0.9
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
hoverEnabled: true
|
||||
anchors.fill: parent
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: {
|
||||
list2.currentIndex = index
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
onCurrentItemChanged: { config.currentLCCode = model[currentIndex]; } /* This works because model is a stringlist */
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ToolButton {
|
||||
id: toolButton
|
||||
x: 19
|
||||
y: 29
|
||||
width: 105
|
||||
height: 48
|
||||
text: qsTr("Back")
|
||||
hoverEnabled: true
|
||||
onClicked: load.source = ""
|
||||
|
||||
Image {
|
||||
id: image1
|
||||
x: 0
|
||||
y: 13
|
||||
width: 22
|
||||
height: 22
|
||||
source: "img/chevron-left-solid.svg"
|
||||
fillMode: Image.PreserveAspectFit
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1 +0,0 @@
|
||||
<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="chevron-left" class="svg-inline--fa fa-chevron-left fa-w-10" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><path fill="currentColor" d="M34.52 239.03L228.87 44.69c9.37-9.37 24.57-9.37 33.94 0l22.67 22.67c9.36 9.36 9.37 24.52.04 33.9L131.49 256l154.02 154.75c9.34 9.38 9.32 24.54-.04 33.9l-22.67 22.67c-9.37 9.37-24.57 9.37-33.94 0L34.52 272.97c-9.37-9.37-9.37-24.57 0-33.94z"></path></svg>
|
Before Width: | Height: | Size: 482 B |
@ -1,2 +0,0 @@
|
||||
SPDX-FileCopyrightText: 2020 https://github.com/FortAwesome/Font-Awesome
|
||||
SPDX-License-Identifier: CC-BY-4.0
|
@ -1,7 +1,7 @@
|
||||
/* === This file is part of Calamares - <https://calamares.io> ===
|
||||
*
|
||||
* SPDX-FileCopyrightText: 2020 Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2020 Anke Boersma <demm@kaosx.us>
|
||||
* SPDX-FileCopyrightText: 2020 - 2022 Anke Boersma <demm@kaosx.us>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is Free Software: see the License-Identifier above.
|
||||
@ -17,8 +17,15 @@ import QtQuick.Layouts 1.3
|
||||
import org.kde.kirigami 2.7 as Kirigami
|
||||
|
||||
Page {
|
||||
width: 800
|
||||
height: 550
|
||||
id: root
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
|
||||
readonly property color headerBackgroundColor: Kirigami.Theme.alternateBackgroundColor //"#eff0f1"
|
||||
readonly property color backgroundLighterColor: "#ffffff"
|
||||
readonly property color highlightColor: Kirigami.Theme.highlightColor //"#3498DB"
|
||||
readonly property color textColor: Kirigami.Theme.textColor //"#1F1F1F"
|
||||
readonly property color highlightedTextColor: Kirigami.Theme.highlightedTextColor
|
||||
|
||||
function onActivate() {
|
||||
/* If you want the map to follow Calamares's GeoIP
|
||||
@ -41,52 +48,209 @@ Page {
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.bottomMargin : 20
|
||||
width: parent.width
|
||||
spacing: 50
|
||||
|
||||
Kirigami.FormLayout {
|
||||
id: lang
|
||||
GridLayout {
|
||||
rowSpacing: Kirigami.Units.largeSpacing
|
||||
columnSpacing: Kirigami.Units.largeSpacing
|
||||
|
||||
GridLayout {
|
||||
anchors {
|
||||
left: parent.left
|
||||
top: parent.top
|
||||
right: parent.right
|
||||
Kirigami.Icon {
|
||||
source: "qrc:/img/locale.svg"
|
||||
Layout.fillHeight: true
|
||||
Layout.maximumHeight: Kirigami.Units.iconSizes.large
|
||||
Layout.preferredWidth: height
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
Label {
|
||||
Layout.fillWidth: true
|
||||
wrapMode: Text.WordWrap
|
||||
text: config.currentLanguageStatus
|
||||
}
|
||||
rowSpacing: Kirigami.Units.largeSpacing
|
||||
columnSpacing: Kirigami.Units.largeSpacing
|
||||
|
||||
Image {
|
||||
source: "img/locale.svg"
|
||||
Layout.fillHeight: true
|
||||
Layout.maximumHeight: Kirigami.Units.iconSizes.medium
|
||||
Layout.preferredWidth: height
|
||||
}
|
||||
ColumnLayout {
|
||||
Label {
|
||||
Layout.fillWidth: true
|
||||
wrapMode: Text.WordWrap
|
||||
text: config.currentLanguageStatus
|
||||
}
|
||||
Kirigami.Separator {
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
Label {
|
||||
Layout.fillWidth: true
|
||||
wrapMode: Text.WordWrap
|
||||
text: config.currentLCStatus
|
||||
}
|
||||
Kirigami.Separator {
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
Button {
|
||||
Layout.alignment: Qt.AlignRight|Qt.AlignVCenter
|
||||
Layout.columnSpan: 2
|
||||
text: qsTr("Change")
|
||||
//onClicked: console.log("Adjust Language clicked");
|
||||
onClicked: {
|
||||
onClicked: load.source = "i18n.qml"
|
||||
drawerLanguage.open()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
GridLayout {
|
||||
rowSpacing: Kirigami.Units.largeSpacing
|
||||
columnSpacing: Kirigami.Units.largeSpacing
|
||||
|
||||
Kirigami.Icon {
|
||||
source: "qrc:/img/locale.svg"
|
||||
Layout.fillHeight: true
|
||||
Layout.maximumHeight: Kirigami.Units.iconSizes.large
|
||||
Layout.preferredWidth: height
|
||||
}
|
||||
ColumnLayout {
|
||||
Label {
|
||||
Layout.fillWidth: true
|
||||
wrapMode: Text.WordWrap
|
||||
text: config.currentLCStatus
|
||||
}
|
||||
Kirigami.Separator {
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
Button {
|
||||
Layout.alignment: Qt.AlignRight|Qt.AlignVCenter
|
||||
Layout.columnSpan: 2
|
||||
text: qsTr("Change")
|
||||
onClicked: {
|
||||
drawerLocale.open()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Drawer {
|
||||
id: drawerLanguage
|
||||
width: 0.33 * root.width
|
||||
height: root.height
|
||||
edge: Qt.LeftEdge
|
||||
|
||||
ScrollView {
|
||||
id: scroll1
|
||||
anchors.fill: parent
|
||||
contentHeight: 800
|
||||
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
|
||||
|
||||
ListView {
|
||||
id: list1
|
||||
focus: true
|
||||
clip: true
|
||||
width: parent.width
|
||||
|
||||
model: config.supportedLocales
|
||||
currentIndex: -1 //config.localeIndex
|
||||
|
||||
header: Rectangle {
|
||||
width: parent.width
|
||||
height: 100
|
||||
color: "#eff0f1" //headerBackgroundColor
|
||||
Text {
|
||||
anchors.fill: parent
|
||||
wrapMode: Text.WordWrap
|
||||
text: qsTr("<h3>Languages</h3> </br>
|
||||
The system locale setting affects the language and character set for some command line user interface elements. The current setting is <strong>%1</strong>.").arg(config.currentLanguageCode)
|
||||
font.pointSize: 10
|
||||
}
|
||||
}
|
||||
|
||||
delegate: ItemDelegate {
|
||||
|
||||
property variant myData: model
|
||||
hoverEnabled: true
|
||||
width: drawerLanguage.width
|
||||
implicitHeight: 24
|
||||
highlighted: ListView.isCurrentItem
|
||||
Label {
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
width: parent.width
|
||||
height: 24
|
||||
color: highlighted ? "#eff0f1" : "#1F1F1F" // headerBackgroundColor : textColor
|
||||
text: modelData
|
||||
background: Rectangle {
|
||||
|
||||
color: highlighted || hovered ? highlightColor : backgroundLighterColor
|
||||
opacity: highlighted || hovered ? 0.5 : 0.9
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
hoverEnabled: true
|
||||
anchors.fill: parent
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: {
|
||||
list1.currentIndex = index
|
||||
drawerLanguage.close()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
onCurrentItemChanged: { config.currentLanguageCode = model[currentIndex] } /* This works because model is a stringlist */
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Drawer {
|
||||
id: drawerLocale
|
||||
width: 0.33 * root.width
|
||||
height: root.height
|
||||
edge: Qt.RightEdge
|
||||
|
||||
ScrollView {
|
||||
id: scroll2
|
||||
anchors.fill: parent
|
||||
contentHeight: 800
|
||||
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
|
||||
|
||||
ListView {
|
||||
id: list2
|
||||
focus: true
|
||||
clip: true
|
||||
width: parent.width
|
||||
|
||||
model: config.supportedLocales
|
||||
currentIndex: -1 //model.currentLCCodeIndex
|
||||
|
||||
header: Rectangle {
|
||||
width: parent.width
|
||||
height: 100
|
||||
color: "#eff0f1" // headerBackgroundColor
|
||||
Text {
|
||||
anchors.fill: parent
|
||||
wrapMode: Text.WordWrap
|
||||
text: qsTr("<h3>Locales</h3> </br>
|
||||
The system locale setting affects the numbers and dates format. The current setting is <strong>%1</strong>.").arg(config.currentLCCode)
|
||||
font.pointSize: 10
|
||||
}
|
||||
}
|
||||
|
||||
delegate: ItemDelegate {
|
||||
|
||||
hoverEnabled: true
|
||||
width: drawerLocale.width
|
||||
implicitHeight: 24
|
||||
highlighted: ListView.isCurrentItem
|
||||
Label {
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
width: parent.width
|
||||
height: 24
|
||||
color: highlighted ? "#eff0f1" : "#1F1F1F" // headerBackgroundColor : textColor
|
||||
text: modelData
|
||||
background: Rectangle {
|
||||
|
||||
color: highlighted || hovered ? highlightColor : backgroundLighterColor
|
||||
opacity: highlighted || hovered ? 0.5 : 0.9
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
hoverEnabled: true
|
||||
anchors.fill: parent
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: {
|
||||
list2.currentIndex = index
|
||||
drawerLocale.close()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
onCurrentItemChanged: { config.currentLCCode = model[currentIndex]; } /* This works because model is a stringlist */
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loader {
|
||||
id:load
|
||||
|
@ -1,6 +1,5 @@
|
||||
<RCC>
|
||||
<qresource>
|
||||
<file>i18n.qml</file>
|
||||
<file>localeq.qml</file>
|
||||
<file>Map.qml</file>
|
||||
<file>Offline.qml</file>
|
||||
@ -8,6 +7,5 @@
|
||||
<file>img/minus.png</file>
|
||||
<file>img/pin.svg</file>
|
||||
<file>img/plus.png</file>
|
||||
<file>img/chevron-left-solid.svg</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
@ -42,7 +42,7 @@ def systemctl(units):
|
||||
action = "enable"
|
||||
mandatory = False
|
||||
else:
|
||||
if not unit.has_key("name"):
|
||||
if "name" not in unit:
|
||||
libcalamares.utils.error("The key 'name' is missing from the mapping {_unit!s}. Continuing to the next unit.".format(_unit=str(unit)))
|
||||
continue
|
||||
name = unit["name"]
|
||||
|
Loading…
Reference in New Issue
Block a user