2021-01-27 13:20:15 +00:00
|
|
|
let topFound = false
|
|
|
|
|
let bottomFound = false
|
|
|
|
|
|
|
|
|
|
for (let i in panels()) {
|
|
|
|
|
print(panels()[i].type)
|
|
|
|
|
if (panels()[i].type === "org.kde.phone.panel") {
|
|
|
|
|
topFound = true;
|
|
|
|
|
} else if (panels()[i].type === "org.kde.phone.taskpanel") {
|
2021-01-28 10:05:33 +00:00
|
|
|
bottomFound = true;
|
2021-01-27 13:20:15 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!topFound) {
|
2021-02-26 03:56:25 +00:00
|
|
|
// keep widget list synced with the layout.js
|
2021-01-27 13:20:15 +00:00
|
|
|
let topPanel = new Panel("org.kde.phone.panel")
|
2021-02-26 03:56:25 +00:00
|
|
|
topPanel.addWidget("org.kde.plasma.notifications");
|
|
|
|
|
topPanel.location = "top";
|
2021-10-12 13:50:36 +00:00
|
|
|
topPanel.height = 1.25 * gridUnit;
|
2021-01-27 13:20:15 +00:00
|
|
|
}
|
|
|
|
|
if (!bottomFound) {
|
2021-02-26 03:56:25 +00:00
|
|
|
let bottomPanel = new Panel("org.kde.phone.taskpanel")
|
|
|
|
|
bottomPanel.location = "bottom";
|
|
|
|
|
bottomPanel.height = 2 * gridUnit;
|
2021-01-27 13:20:15 +00:00
|
|
|
}
|