mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-08-02 01:34:46 +00:00
Fix shell layout.js
This commit is contained in:
parent
3ede60a091
commit
6375fb424f
2 changed files with 13 additions and 7 deletions
|
|
@ -8,18 +8,21 @@
|
||||||
var desktopsArray = desktopsForActivity(currentActivity());
|
var desktopsArray = desktopsForActivity(currentActivity());
|
||||||
for (var j = 0; j < desktopsArray.length; j++) {
|
for (var j = 0; j < desktopsArray.length; j++) {
|
||||||
desktopsArray[j].wallpaperPlugin = "org.kde.image";
|
desktopsArray[j].wallpaperPlugin = "org.kde.image";
|
||||||
}
|
|
||||||
|
|
||||||
|
if (j == 0) {
|
||||||
// add meta shortcut
|
// add meta shortcut
|
||||||
desktopsArray[0].currentConfigGroup = ["Shortcuts"]
|
desktopsArray[0].currentConfigGroup = ["Shortcuts"]
|
||||||
desktopsArray[0].writeConfig("global", "Meta+F1")
|
desktopsArray[0].writeConfig("global", "Meta+F1")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// keep this list in sync with shell/contents/updates/panelsfix.js
|
// keep this list in sync with shell/contents/updates/panelsfix.js
|
||||||
var panel = new Panel("org.kde.phone.panel");
|
var panel = new Panel("org.kde.plasma.mobile.panel");
|
||||||
panel.location = "top";
|
panel.location = "top";
|
||||||
panel.addWidget("org.kde.plasma.notifications");
|
panel.addWidget("org.kde.plasma.notifications");
|
||||||
panel.height = 1.25 * gridUnit; // HACK: supposed to be gridUnit + smallSpacing, but it doesn't seem to give the correct number
|
panel.height = 1.25 * gridUnit; // HACK: supposed to be gridUnit + smallSpacing, but it doesn't seem to give the correct number
|
||||||
|
|
||||||
var bottomPanel = new Panel("org.kde.phone.taskpanel")
|
var bottomPanel = new Panel("org.kde.desktopcontainment")
|
||||||
bottomPanel.location = "bottom";
|
bottomPanel.location = "bottom";
|
||||||
bottomPanel.height = 2 * gridUnit;
|
bottomPanel.height = 2 * gridUnit;
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,6 @@ import org.kde.kirigami 2.20 as Kirigami
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
visible: false //adjust borders is run during setup. We want to avoid painting till completed
|
|
||||||
property Item containment
|
property Item containment
|
||||||
|
|
||||||
color: (containment && containment.backgroundHints == PlasmaCore.Types.NoBackground) ? "transparent" : PlasmaCore.Theme.textColor
|
color: (containment && containment.backgroundHints == PlasmaCore.Types.NoBackground) ? "transparent" : PlasmaCore.Theme.textColor
|
||||||
|
|
@ -53,13 +52,17 @@ Rectangle {
|
||||||
}
|
}
|
||||||
|
|
||||||
onContainmentChanged: {
|
onContainmentChanged: {
|
||||||
|
if (containment == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
containment.parent = root;
|
containment.parent = root;
|
||||||
containment.visible = true;
|
containment.visible = true;
|
||||||
containment.anchors.fill = root;
|
containment.anchors.fill = root;
|
||||||
}
|
}
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
visible = true
|
// desktop.windowType = Shell.Desktop.Desktop;
|
||||||
}
|
}
|
||||||
|
|
||||||
// This is taken from plasma-desktop's shell package, try to keep it in sync
|
// This is taken from plasma-desktop's shell package, try to keep it in sync
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue