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

0001 /* === This file is part of Calamares - <https://calamares.io> ===
0002  *
0003  *   SPDX-FileCopyrightText: 2020 - 2021 Anke Boersma <demm@kaosx.us>
0004  *   SPDX-License-Identifier: GPL-3.0-or-later
0005  *
0006  *   Calamares is Free Software: see the License-Identifier above.
0007  *
0008  */
0009 
0010 import io.calamares.ui 1.0
0011 
0012 import QtQuick 2.7
0013 import QtQuick.Controls 2.2
0014 import QtQuick.Layouts 1.3
0015 
0016 import org.kde.kirigami 2.7 as Kirigami
0017 
0018 Item {
0019     readonly property color backgroundColor: Kirigami.Theme.backgroundColor //"#F5F5F5"
0020     readonly property color headerBackgroundColor: Kirigami.Theme.alternateBackgroundColor //"#d3d3d3"
0021     readonly property color backgroundLighterColor: "#ffffff"
0022     readonly property color highlightColor: Kirigami.Theme.highlightColor //"#3498DB"
0023     readonly property color textColor: Kirigami.Theme.textColor
0024     readonly property color highlightedTextColor: Kirigami.Theme.highlightedTextColor
0025 
0026     width: parent.width
0027     height: parent.height
0028     focus: true
0029 
0030     Rectangle {
0031         id: textArea
0032         x: 28
0033         y: 14
0034         anchors.fill: parent
0035         color: backgroundColor
0036 
0037         Column {
0038             id: languages
0039             x: 130
0040             y: 40
0041 
0042             Rectangle {
0043                 width: 250
0044                 height: 140
0045                 color: headerBackgroundColor
0046                 Text {
0047                     anchors.top: parent.top
0048                     width: 240
0049                     wrapMode: Text.WordWrap
0050                     text: qsTr("<h1>Languages</h1> </br>
0051                     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)
0052                     font.pointSize: 10
0053                 }
0054             }
0055 
0056             Rectangle {
0057                 width: 250
0058                 height: 300
0059 
0060                 ScrollView {
0061                     id: scroll1
0062                     anchors.fill: parent
0063                     contentHeight: 800
0064                     ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
0065 
0066                     ListView {
0067                         id: list1
0068                         focus: true
0069                         clip: true
0070                         width: parent.width
0071 
0072                         model: config.supportedLocales
0073 
0074                         currentIndex: -1 //model.currentLanguageCodeIndex
0075                         delegate: ItemDelegate {
0076 
0077                             hoverEnabled: true
0078                             width: parent.width
0079                             implicitHeight: 18
0080                             highlighted: ListView.isCurrentItem
0081                             Label {
0082                                 Layout.fillHeight: true
0083                                 Layout.fillWidth: true
0084                                 width: parent.width
0085                                 height: 18
0086                                 color: highlighted ? highlightedTextColor : textColor
0087                                 text: modelData
0088                                 background: Rectangle {
0089 
0090                                     color: highlighted || hovered ? highlightColor : backgroundLighterColor
0091                                     opacity: highlighted || hovered ? 0.5 : 0.9
0092                                 }
0093 
0094                                 MouseArea {
0095                                     hoverEnabled: true
0096                                     anchors.fill: parent
0097                                     cursorShape: Qt.PointingHandCursor
0098                                     onClicked: {
0099                                         list1.currentIndex = index
0100                                     }
0101                                 }
0102                             }
0103                         }
0104                         onCurrentItemChanged: { config.currentLanguageCode = model[currentIndex] } /* This works because model is a stringlist */
0105                     }
0106                 }
0107             }
0108         }
0109 
0110         Column {
0111             id: lc_numeric
0112             x: 430
0113             y: 40
0114 
0115             Rectangle {
0116                 width: 250
0117                 height: 140
0118                 color: headerBackgroundColor
0119                 Text {
0120                     anchors.top: parent.top
0121                     width: 240
0122                     wrapMode: Text.WordWrap
0123                     text: qsTr("<h1>Locales</h1> </br>
0124                     The system locale setting affects the numbers and dates format. The current setting is <strong>%1</strong>.").arg(config.currentLCCode)
0125                     font.pointSize: 10
0126                 }
0127             }
0128 
0129             Rectangle {
0130                 width: 250
0131                 height: 300
0132 
0133                 ScrollView {
0134                     id: scroll2
0135                     anchors.fill: parent
0136                     contentHeight: 800
0137                     ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
0138 
0139                     ListView {
0140                         id: list2
0141                         focus: true
0142                         clip: true
0143 
0144                         model: config.supportedLocales
0145 
0146                         currentIndex: -1 //model.currentLCCodeIndex
0147                         delegate: ItemDelegate {
0148 
0149                             hoverEnabled: true
0150                             width: parent.width
0151                             implicitHeight: 18
0152                             highlighted: ListView.isCurrentItem
0153                             Label {
0154                                 Layout.fillHeight: true
0155                                 Layout.fillWidth: true
0156                                 width: parent.width
0157                                 height: 18
0158                                 color: highlighted ? highlightedTextColor : textColor
0159                                 text: modelData
0160                                 background: Rectangle {
0161 
0162                                     color: highlighted || hovered ? highlightColor : backgroundLighterColor
0163                                     opacity: highlighted || hovered ? 0.5 : 0.9
0164                                 }
0165 
0166                                 MouseArea {
0167                                     hoverEnabled: true
0168                                     anchors.fill: parent
0169                                     cursorShape: Qt.PointingHandCursor
0170                                     onClicked: {
0171                                         list2.currentIndex = index
0172                                     }
0173                                 }
0174                             }
0175                         }
0176                         onCurrentItemChanged: { config.currentLCCode = model[currentIndex]; } /* This works because model is a stringlist */
0177                     }
0178                 }
0179             }
0180 
0181         }
0182 
0183         ToolButton {
0184             id: toolButton
0185             x: 19
0186             y: 29
0187             width: 105
0188             height: 48
0189             text: qsTr("Back")
0190             hoverEnabled: true
0191             onClicked: load.source = ""
0192 
0193             Image {
0194                 id: image1
0195                 x: 0
0196                 y: 13
0197                 width: 22
0198                 height: 22
0199                 source: "img/chevron-left-solid.svg"
0200                 fillMode: Image.PreserveAspectFit
0201             }
0202         }
0203     }
0204 }