diff --git a/melawy-kde-theme/usr/share/plasma/layout-templates/org.github.Melawy.desktop.MelawyPanel/contents/layout.js b/melawy-kde-theme/usr/share/plasma/layout-templates/org.github.Melawy.desktop.MelawyPanel/contents/layout.js index 8b915df..4b8825a 100644 --- a/melawy-kde-theme/usr/share/plasma/layout-templates/org.github.Melawy.desktop.MelawyPanel/contents/layout.js +++ b/melawy-kde-theme/usr/share/plasma/layout-templates/org.github.Melawy.desktop.MelawyPanel/contents/layout.js @@ -1,13 +1,14 @@ -var plasma = getApiVersion(1); +let plasma = getApiVersion(1); let allDesktops = desktops(); + for (i=0;i maximumWidth) { @@ -91,7 +93,28 @@ panel.height = Math.floor(gridUnit * 2); panel.hiding = "none"; /*spacer for center view*/ -// panel.addWidget("org.kde.plasma.panelspacer"); +// let max_width = 0; +// let max_height = 0; +// +// for (count = 0; count < screenCount; count++) { +// geo = screenGeometry(count); +// if (geo.width > max_width) { +// max_width = geo.width; +// } +// +// if (geo.height > max_height) { +// max_height = geo.height; +// } +// } +// +// let aspect_ratio = max_width / max_height; + +let aspect_ratio = geo.width / geo.height; + +if (aspect_ratio > 1.8) { + panel.addWidget("org.kde.plasma.panelspacer"); +} + /*App Launcher*/ let baseApps = [ @@ -174,7 +197,7 @@ start_menu.writeConfig("tileLabelAlignment", "center"); /*Desktops button*/ -panel.addWidget("org.kde.plasma.pager"); +//panel.addWidget("org.kde.plasma.pager"); panel.addWidget("com.himdek.kde.plasma.overview"); panel.addWidget("org.kde.plasma.icontasks"); panel.addWidget("org.kde.plasma.panelspacer"); @@ -187,7 +210,7 @@ panel.addWidget("org.kde.plasma.panelspacer"); * our supported IME backends when chosen during installation * of common distributions. */ -var langIds = ["as", // Assamese +let langIds = ["as", // Assamese "bn", // Bengali "bo", // Tibetan "brx", // Bodo