mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-18 07:34:54 +00:00
cleanup: Use object shorthand where possible
ES6 allows to omit property names where they match the name of the assigned variable, which makes code less redunant and thus cleaner. We will soon enforce that in our eslint rules, so make sure we use the shorthand wherever possible. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/805
This commit is contained in:
parent
9eaa0089d0
commit
c860409da5
40 changed files with 89 additions and 94 deletions
|
|
@ -697,7 +697,7 @@ class WorkspacesDisplay extends St.Widget {
|
|||
|
||||
_getMonitorIndexForEvent(event) {
|
||||
let [x, y] = event.get_coords();
|
||||
let rect = new Meta.Rectangle({ x: x, y: y, width: 1, height: 1 });
|
||||
let rect = new Meta.Rectangle({ x, y, width: 1, height: 1 });
|
||||
return global.display.get_monitor_index_for_rect(rect);
|
||||
}
|
||||
|
||||
|
|
@ -766,7 +766,7 @@ class WorkspacesDisplay extends St.Widget {
|
|||
let allocation = this.allocation;
|
||||
let width = allocation.x2 - allocation.x1;
|
||||
let height = allocation.y2 - allocation.y1;
|
||||
let primaryGeometry = { x: x, y: y, width: width, height: height };
|
||||
let primaryGeometry = { x, y, width, height };
|
||||
|
||||
let monitors = Main.layoutManager.monitors;
|
||||
for (let i = 0; i < monitors.length; i++) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue