Commit 098a965b authored by Andrey Butirsky's avatar Andrey Butirsky
Browse files

applets/keyboardlayout: fix unexpected expansion to full representation

As a workaround, remove Keyboard Shortcuts configuration tab and already
assigned shortcuts for the applet

BUG: 434713
parent 977a775d
Pipeline #210241 passed with stage
in 3 minutes and 31 seconds
......@@ -45,4 +45,15 @@ Kirigami.FormLayout {
icon.name: "configure"
onClicked: KQCAddons.KCMShell.openSystemSettings("kcm_keyboard", "--tab=layouts")
}
Component.onCompleted: {
// hide Keyboard Shortcuts tab
var appletConfiguration = app
while (appletConfiguration.parent) {
appletConfiguration = appletConfiguration.parent
}
if (appletConfiguration && typeof appletConfiguration.globalConfigModel !== "undefined") {
appletConfiguration.globalConfigModel.removeCategoryAt(0)
}
}
}
const containments = desktops().concat(panels());
for (var i in containments) {
forEachWidgetInContainment(containments[i]);
}
function forEachWidgetInContainment(containment) {
const widgets = containment.widgets();
for (var i in widgets) {
const widget = widgets[i];
switch(widget.type) {
case "org.kde.plasma.systemtray":
systemtrayId = widget.readConfig("SystrayContainmentId");
if (systemtrayId) {
forEachWidgetInContainment(desktopById(systemtrayId))
}
break;
case "org.kde.plasma.keyboardlayout":
if (widget.globalShortcut) {
print("Shortcut to remove: " + widget.globalShortcut);
widget.globalShortcut = "";
}
break;
}
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment