Update
This commit is contained in:
		
							parent
							
								
									a312ad5d34
								
							
						
					
					
						commit
						011315fdb0
					
				|  | @ -1,13 +1,14 @@ | ||||||
| var plasma = getApiVersion(1); | let plasma = getApiVersion(1); | ||||||
| 
 | 
 | ||||||
| let allDesktops = desktops(); | let allDesktops = desktops(); | ||||||
|  | 
 | ||||||
| for (i=0;i<allDesktops.length;i++) { | for (i=0;i<allDesktops.length;i++) { | ||||||
|     desktop = allDesktops[i]; |     desktop = allDesktops[i]; | ||||||
|     desktop.wallpaperPlugin = "a2n.blur"; |     desktop.wallpaperPlugin = "a2n.blur"; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| var desktopsArray = desktopsForActivity(currentActivity()); | let desktopsArray = desktopsForActivity(currentActivity()); | ||||||
| for( var j = 0; j < desktopsArray.length; j++) { | for(j = 0; j < desktopsArray.length; j++) { | ||||||
|     desktopsArray[j].wallpaperPlugin = 'a2n.blur'; |     desktopsArray[j].wallpaperPlugin = 'a2n.blur'; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | @ -39,17 +40,17 @@ for( var j = 0; j < desktopsArray.length; j++) { | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| /*General*/ | /*General*/ | ||||||
| var panel = new Panel; | let panel = new Panel; | ||||||
| panel.offset = 0; | panel.offset = 0; | ||||||
| panel.location = "floating"; | panel.location = "floating"; | ||||||
| panel.alignment = "center"; | panel.alignment = "center"; | ||||||
| // panel.length = 105;
 | // panel.length = 105;
 | ||||||
| 
 | 
 | ||||||
| var panelScreen = panel.screen; | let panelScreen = panel.screen; | ||||||
| var freeEdges = {"bottom": true, "top": true, "left": true, "right": true}; | let freeEdges = {"bottom": true, "top": true, "left": true, "right": true}; | ||||||
| 
 | 
 | ||||||
| for (i = 0; i < panelIds.length; ++i) { | for (i = 0; i < panelIds.length; ++i) { | ||||||
|     var tmpPanel = panelById(panelIds[i]); |     let tmpPanel = panelById(panelIds[i]); | ||||||
|     if (tmpPanel.screen == panelScreen) { |     if (tmpPanel.screen == panelScreen) { | ||||||
|         // Ignore the new panel
 |         // Ignore the new panel
 | ||||||
|         if (tmpPanel.id != panel.id) { |         if (tmpPanel.id != panel.id) { | ||||||
|  | @ -73,8 +74,9 @@ if (freeEdges["bottom"] == true) { | ||||||
| 
 | 
 | ||||||
| // Restrict horizontal panel to a maximum size of a 21:9 monitor
 | // Restrict horizontal panel to a maximum size of a 21:9 monitor
 | ||||||
| const maximumAspectRatio = 21/9; | const maximumAspectRatio = 21/9; | ||||||
|  | const geo = screenGeometry(panelScreen); | ||||||
|  | 
 | ||||||
| if (panel.formFactor === "horizontal") { | if (panel.formFactor === "horizontal") { | ||||||
|     const geo = screenGeometry(panelScreen); |  | ||||||
|     const maximumWidth = Math.ceil(geo.height * maximumAspectRatio); |     const maximumWidth = Math.ceil(geo.height * maximumAspectRatio); | ||||||
| 
 | 
 | ||||||
|     if (geo.width > maximumWidth) { |     if (geo.width > maximumWidth) { | ||||||
|  | @ -91,7 +93,28 @@ panel.height = Math.floor(gridUnit * 2); | ||||||
| panel.hiding = "none"; | panel.hiding = "none"; | ||||||
| 
 | 
 | ||||||
| /*spacer for center view*/ | /*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*/ | /*App Launcher*/ | ||||||
| let baseApps = [ | let baseApps = [ | ||||||
|  | @ -174,7 +197,7 @@ start_menu.writeConfig("tileLabelAlignment", "center"); | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| /*Desktops button*/ | /*Desktops button*/ | ||||||
| panel.addWidget("org.kde.plasma.pager"); | //panel.addWidget("org.kde.plasma.pager");
 | ||||||
| panel.addWidget("com.himdek.kde.plasma.overview"); | panel.addWidget("com.himdek.kde.plasma.overview"); | ||||||
| panel.addWidget("org.kde.plasma.icontasks"); | panel.addWidget("org.kde.plasma.icontasks"); | ||||||
| panel.addWidget("org.kde.plasma.panelspacer"); | panel.addWidget("org.kde.plasma.panelspacer"); | ||||||
|  | @ -187,7 +210,7 @@ panel.addWidget("org.kde.plasma.panelspacer"); | ||||||
|  * our supported IME backends when chosen during installation |  * our supported IME backends when chosen during installation | ||||||
|  * of common distributions. */ |  * of common distributions. */ | ||||||
| 
 | 
 | ||||||
| var langIds = ["as",    // Assamese
 | let langIds = ["as",    // Assamese
 | ||||||
| "bn",    // Bengali
 | "bn",    // Bengali
 | ||||||
| "bo",    // Tibetan
 | "bo",    // Tibetan
 | ||||||
| "brx",   // Bodo
 | "brx",   // Bodo
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue