[gnome-shell/wip/carlosg/bottom-emoji-row-alignment: 26/27] keyboard: align AspectContainer to bottom if restricting vertically
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/carlosg/bottom-emoji-row-alignment: 26/27] keyboard: align AspectContainer to bottom if restricting vertically
- Date: Tue, 5 Mar 2019 21:12:08 +0000 (UTC)
commit 26b44b48ab6562ae9f3c0f6f1ea57731b20ddb71
Author: Carlos Garnacho <carlosg gnome org>
Date: Tue Mar 5 19:33:49 2019 +0100
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
js/ui/keyboard.js | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js
index bfddcdec9..124831d6a 100644
--- a/js/ui/keyboard.js
+++ b/js/ui/keyboard.js
@@ -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);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]