mirror of
https://gitlab.gnome.org/julianschacher/top-bar-organizer.git
synced 2025-10-27 07:09:07 +00:00
refactor: more nicely get the data for panelBox in #orderTopBarItems
This commit is contained in:
parent
114e1335d1
commit
0d51b81041
@ -121,18 +121,7 @@ export default class TopBarOrganizerExtension extends Extension {
|
|||||||
const validBoxOrder = this._boxOrderManager.getValidBoxOrder(box);
|
const validBoxOrder = this._boxOrderManager.getValidBoxOrder(box);
|
||||||
|
|
||||||
// Get the relevant box of `Main.panel`.
|
// Get the relevant box of `Main.panel`.
|
||||||
let panelBox;
|
let panelBox = (Main.panel as CustomPanel)[`_${box}Box`];
|
||||||
switch (box) {
|
|
||||||
case "left":
|
|
||||||
panelBox = (Main.panel as CustomPanel)._leftBox;
|
|
||||||
break;
|
|
||||||
case "center":
|
|
||||||
panelBox = (Main.panel as CustomPanel)._centerBox;
|
|
||||||
break;
|
|
||||||
case "right":
|
|
||||||
panelBox = (Main.panel as CustomPanel)._rightBox;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Go through the items of the validBoxOrder and order the GNOME Shell
|
/// Go through the items of the validBoxOrder and order the GNOME Shell
|
||||||
/// top bar box accordingly.
|
/// top bar box accordingly.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user