From e2a5eb68405889e23c327d2136608aa452f74439 Mon Sep 17 00:00:00 2001 From: demmm Date: Fri, 7 Aug 2020 12:44:07 +0200 Subject: [PATCH] [welcomeq] language bar icon configurable similar functionality as in welcome module, set in welcomeq.conf --- src/modules/welcomeq/welcomeq.conf | 2 ++ src/modules/welcomeq/welcomeq.qml | 30 ++++++++++++++++++++++++------ 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/src/modules/welcomeq/welcomeq.conf b/src/modules/welcomeq/welcomeq.conf index 32be7fcb5..035db9714 100644 --- a/src/modules/welcomeq/welcomeq.conf +++ b/src/modules/welcomeq/welcomeq.conf @@ -33,3 +33,5 @@ geoip: style: "none" url: "https://geoip.kde.org/v1/ubiquity" # extended XML format selector: "CountryCode" # blank uses default, which is wrong + +#languageIcon: languages diff --git a/src/modules/welcomeq/welcomeq.qml b/src/modules/welcomeq/welcomeq.qml index ffa480f4a..7ba8933c8 100644 --- a/src/modules/welcomeq/welcomeq.qml +++ b/src/modules/welcomeq/welcomeq.qml @@ -144,16 +144,34 @@ Page width: parent.width Layout.fillWidth: true focus: true - Image { - id: image - height: 48 - fillMode: Image.PreserveAspectFit - source: "img/language-icon-48px.png" + + Loader { + id: imLoader + + Component { + id: icon + Kirigami.Icon { + source: config.languageIcon + height: 48 + width: 48 + } + } + + Component { + id: image + Image { + height: 48 + fillMode: Image.PreserveAspectFit + source: "img/language-icon-48px.png" + } + } + + sourceComponent: (config.languageIcon != "") ? icon : image } ComboBox { id: languages - anchors.left: image.right + anchors.left: imLoader.right width: languageBar.width /1.1 textRole: "label" currentIndex: config.localeIndex