parent
3dea487823
commit
d434906d0d
@ -1,51 +0,0 @@
|
|||||||
From 8cbc16f0925c75b569c39184a68595c54278e75a Mon Sep 17 00:00:00 2001
|
|
||||||
From: ivan tkachenko <me@ratijas.tk>
|
|
||||||
Date: Wed, 22 Mar 2023 22:30:44 +0600
|
|
||||||
Subject: [PATCH] sddm-theme: Populate keyboard layouts menu only on first show
|
|
||||||
|
|
||||||
Doing it synchronously can be very slow; seemingly scaling with the
|
|
||||||
number of items in the model.
|
|
||||||
|
|
||||||
https://bugzilla.redhat.com/show_bug.cgi?id=2179998
|
|
||||||
---
|
|
||||||
lookandfeel/sddm-theme/KeyboardButton.qml | 14 +++++++++-----
|
|
||||||
1 file changed, 9 insertions(+), 5 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/lookandfeel/sddm-theme/KeyboardButton.qml b/lookandfeel/sddm-theme/KeyboardButton.qml
|
|
||||||
index df8767dda4..ca2458b6d2 100644
|
|
||||||
--- a/lookandfeel/sddm-theme/KeyboardButton.qml
|
|
||||||
+++ b/lookandfeel/sddm-theme/KeyboardButton.qml
|
|
||||||
@@ -17,7 +17,7 @@ PlasmaComponents.ToolButton {
|
|
||||||
onCurrentIndexChanged: keyboard.currentLayout = currentIndex
|
|
||||||
|
|
||||||
text: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Keyboard Layout: %1", keyboard.layouts[currentIndex].longName)
|
|
||||||
- visible: menu.count > 1
|
|
||||||
+ visible: keyboard.layouts.length > 1
|
|
||||||
|
|
||||||
checkable: true
|
|
||||||
checked: menu.opened
|
|
||||||
@@ -36,13 +36,17 @@ PlasmaComponents.ToolButton {
|
|
||||||
PlasmaCore.ColorScope.colorGroup: PlasmaCore.Theme.NormalColorGroup
|
|
||||||
PlasmaCore.ColorScope.inherit: false
|
|
||||||
|
|
||||||
- Instantiator {
|
|
||||||
- id: instantiator
|
|
||||||
- model: {
|
|
||||||
+ onAboutToShow: {
|
|
||||||
+ if (instantiator.model === null) {
|
|
||||||
let layouts = keyboard.layouts;
|
|
||||||
layouts.sort((a, b) => a.longName.localeCompare(b.longName));
|
|
||||||
- return layouts;
|
|
||||||
+ instantiator.model = layouts;
|
|
||||||
}
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ Instantiator {
|
|
||||||
+ id: instantiator
|
|
||||||
+ model: null
|
|
||||||
onObjectAdded: menu.insertItem(index, object)
|
|
||||||
onObjectRemoved: menu.removeItem(object)
|
|
||||||
delegate: PlasmaComponents.MenuItem {
|
|
||||||
--
|
|
||||||
GitLab
|
|
||||||
|
|
@ -1,2 +1,2 @@
|
|||||||
SHA512 (breeze-fedora-0.2.tar.gz) = ff800e686b0dcb498f321bb94d3a8274c89c092f5408ef1ec3fc65333f046aea43444144ecaf166792f807014383af87b1180dc7540905fc10dc375309f8b2a8
|
SHA512 (breeze-fedora-0.2.tar.gz) = ff800e686b0dcb498f321bb94d3a8274c89c092f5408ef1ec3fc65333f046aea43444144ecaf166792f807014383af87b1180dc7540905fc10dc375309f8b2a8
|
||||||
SHA512 (plasma-workspace-5.27.3.tar.xz) = 132db99ff1a81778be928c87f59557cac40547f7ffc92f1738ea1fb575db150590a43838a3a2871e001a7e2975ce91399febfb948e444d2bd42e8a55700af96f
|
SHA512 (plasma-workspace-5.27.4.tar.xz) = d9ac07bfd2c43a920ae0a4ca7ec39aff457535cdc655c2b77881e2d9c1ecbfabc225e854ae36369ce4315a14a483318fa77bb6e62cfe43b711f8551266d19e0b
|
||||||
|
Loading…
Reference in new issue