From 8c22f48e59fe3ea52e050a88e17926bbc69bc8a9 Mon Sep 17 00:00:00 2001 From: Devin Lin Date: Tue, 1 Feb 2022 20:40:37 -0500 Subject: [PATCH] [shell/updates] Ensure upgrade process has new panel height --- shell/contents/updates/5_24_update.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 shell/contents/updates/5_24_update.js diff --git a/shell/contents/updates/5_24_update.js b/shell/contents/updates/5_24_update.js new file mode 100644 index 00000000..d53f5220 --- /dev/null +++ b/shell/contents/updates/5_24_update.js @@ -0,0 +1,18 @@ +// SPDX-FileCopyrightText: 2021 Devin Lin +// SPDX-License-Identifier: GPL-2.0-or-later + +/** + * Configuration updates for Plasma 5.24 + * - Panel heights were changed, ensure those are updated + */ + +print("Applying shell updates for 5.24...") +for (let i in panels()) { + print("Found panel of type: " + panels()[i].type); + if (panels()[i].type === "org.kde.phone.panel") { + panels()[i].height = 1.25 * gridUnit; + } else if (panels()[i].type === "org.kde.phone.taskpanel") { + panels()[i].height = 2 * gridUnit; + } +} +