keyboard: align AspectContainer to bottom if restricting vertically
It is convenient for the OSK so it eg. doesn't appear centered in the available space (eg. on very narrow portrait layouts), plus it will also be convenient to align other AspectContainers to the same baseline. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/439
This commit is contained in:
parent
6349f0feb1
commit
26b44b48ab
@ -73,12 +73,9 @@ class AspectContainer extends St.Widget {
|
||||
box.x1 += Math.floor(diff / 2);
|
||||
box.x2 -= Math.ceil(diff / 2);
|
||||
} else {
|
||||
/* Restrict vertically */
|
||||
/* Restrict vertically, align to bottom */
|
||||
let height = box.get_width() / this._ratio;
|
||||
let diff = box.get_height() - height;
|
||||
|
||||
box.y1 += Math.floor(diff / 2);
|
||||
box.y2 -= Math.floor(diff / 2);
|
||||
box.y1 = box.y2 - Math.floor(height);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user