shell: keep panelsfix.js in sync with layout.js

Otherwise if we add the panels which were missing, we will end up adding
panel without notifications and mediacontroller.
This commit is contained in:
Bhushan Shah 2021-02-26 09:26:25 +05:30
parent b044fd156d
commit e92188b5e9
2 changed files with 8 additions and 4 deletions

View file

@ -1,9 +1,9 @@
var desktopsArray = desktopsForActivity(currentActivity());
for (var j = 0; j < desktopsArray.length; j++) {
desktopsArray[j].wallpaperPlugin = "org.kde.image";
}
desktopsArray[0].addWidget("org.kde.phone.krunner", 0, 0, screenGeometry(0).width, 20)
// keep this list in sync with shell/contents/updates/panelsfix.js
var panel = new Panel("org.kde.phone.panel");
panel.addWidget("org.kde.plasma.notifications");
panel.addWidget("org.kde.plasma.mediacontroller");

View file

@ -11,10 +11,14 @@ for (let i in panels()) {
}
if (!topFound) {
// keep widget list synced with the layout.js
let topPanel = new Panel("org.kde.phone.panel")
topPanel.location = "Top";
topPanel.addWidget("org.kde.plasma.notifications");
topPanel.addWidget("org.kde.plasma.mediacontroller");
topPanel.location = "top";
}
if (!bottomFound) {
let topPanel = new Panel("org.kde.phone.taskpanel")
topPanel.location = "Bottom";
let bottomPanel = new Panel("org.kde.phone.taskpanel")
bottomPanel.location = "bottom";
bottomPanel.height = 2 * gridUnit;
}