[gnome-shell] js: Fix alignment
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] js: Fix alignment
- Date: Mon, 11 Nov 2019 16:59:31 +0000 (UTC)
commit 697912d8a447946d39fec8d78cfcc5023dd42cd1
Author: Florian Müllner <fmuellner gnome org>
Date: Wed Nov 6 12:05:56 2019 +0100
js: Fix alignment
The old StBin alignment properties defaulted to MIDDLE, while the
ClutterActor properties use FILL. Fix the resulting fallout by
setting the alignment explicitly where necessary.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/809
js/ui/animation.js | 4 ++++
js/ui/search.js | 6 +++++-
2 files changed, 9 insertions(+), 1 deletion(-)
---
diff --git a/js/ui/animation.js b/js/ui/animation.js
index b8d5ad5c32..d047b75ed0 100644
--- a/js/ui/animation.js
+++ b/js/ui/animation.js
@@ -71,6 +71,10 @@ class Animation extends St.Bin {
this._animations = textureCache.load_sliced_image(file, width, height,
scaleFactor, resourceScale,
this._animationsLoaded.bind(this));
+ this._animations.set({
+ x_align: Clutter.ActorAlign.CENTER,
+ y_align: Clutter.ActorAlign.CENTER,
+ });
this.set_child(this._animations);
if (wasPlaying)
diff --git a/js/ui/search.js b/js/ui/search.js
index 2f3f47d93d..6c0d05a79e 100644
--- a/js/ui/search.js
+++ b/js/ui/search.js
@@ -452,7 +452,11 @@ var SearchResultsView = GObject.registerClass({
this.add_child(this._scrollView);
- this._statusText = new St.Label({ style_class: 'search-statustext' });
+ this._statusText = new St.Label({
+ style_class: 'search-statustext',
+ x_align: Clutter.ActorAlign.CENTER,
+ y_align: Clutter.ActorAlign.CENTER,
+ });
this._statusBin = new St.Bin({ y_expand: true });
this.add_child(this._statusBin);
this._statusBin.add_actor(this._statusText);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]