[gnome-shell/gnome-3-34] screenShield: Replace child properties
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/gnome-3-34] screenShield: Replace child properties
- Date: Sat, 23 Nov 2019 00:24:17 +0000 (UTC)
commit 9b0d42309b94997778f942149873110f39337d54
Author: Florian Müllner <fmuellner gnome org>
Date: Mon Oct 21 20:44:00 2019 +0200
screenShield: Replace child properties
It turns out https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/780
helped with some redrawing issues on the screen shield, so cherry-pick the
relevant bits to the stable branch.
https://gitlab.gnome.org/GNOME/gnome-shell/issues/1836
js/ui/screenShield.js | 31 +++++++++++++++++--------------
1 file changed, 17 insertions(+), 14 deletions(-)
---
diff --git a/js/ui/screenShield.js b/js/ui/screenShield.js
index ba50ef92fa..f91514322f 100644
--- a/js/ui/screenShield.js
+++ b/js/ui/screenShield.js
@@ -53,11 +53,17 @@ var Clock = class {
this.actor = new St.BoxLayout({ style_class: 'screen-shield-clock',
vertical: true });
- this._time = new St.Label({ style_class: 'screen-shield-clock-time' });
- this._date = new St.Label({ style_class: 'screen-shield-clock-date' });
+ this._time = new St.Label({
+ style_class: 'screen-shield-clock-time',
+ x_align: Clutter.ActorAlign.CENTER,
+ });
+ this._date = new St.Label({
+ style_class: 'screen-shield-clock-date',
+ x_align: Clutter.ActorAlign.CENTER,
+ });
- this.actor.add(this._time, { x_align: St.Align.MIDDLE });
- this.actor.add(this._date, { x_align: St.Align.MIDDLE });
+ this.actor.add_child(this._time);
+ this.actor.add_child(this._date);
this._wallClock = new GnomeDesktop.WallClock({ time_only: true });
this._wallClock.connect('notify::clock', this._updateClock.bind(this));
@@ -93,7 +99,7 @@ var NotificationsBox = class {
style_class: 'screen-shield-notifications-container' });
this._scrollView.add_actor(this._notificationBox);
- this.actor.add(this._scrollView, { x_fill: true, x_align: St.Align.START });
+ this.actor.add_child(this._scrollView);
this._sources = new Map();
Main.messageTray.getSources().forEach(source => {
@@ -134,10 +140,10 @@ var NotificationsBox = class {
_makeNotificationSource(source, box) {
let sourceActor = new MessageTray.SourceActor(source, SUMMARY_ICON_SIZE);
- box.add(sourceActor, { y_fill: true });
+ box.add_child(sourceActor);
let textBox = new St.BoxLayout({ vertical: true });
- box.add(textBox, { y_fill: false, y_align: St.Align.START });
+ box.add_child(textBox);
let title = new St.Label({ text: source.title,
style_class: 'screen-shield-notification-label' });
@@ -160,7 +166,7 @@ var NotificationsBox = class {
box.add(sourceBin);
let textBox = new St.BoxLayout({ vertical: true });
- box.add(textBox, { y_fill: false, y_align: St.Align.START });
+ box.add_child(textBox);
let title = new St.Label({ text: source.title,
style_class: 'screen-shield-notification-label' });
@@ -222,7 +228,7 @@ var NotificationsBox = class {
obj.sourceBox = new St.BoxLayout({ style_class: 'screen-shield-notification-source',
x_expand: true });
this._showSource(source, obj, obj.sourceBox);
- this._notificationBox.add(obj.sourceBox, { x_fill: false, x_align: St.Align.START });
+ this._notificationBox.add_child(obj.sourceBox);
obj.sourceCountChangedId = source.connect('count-updated', source => {
this._countChanged(source, obj);
@@ -1133,16 +1139,13 @@ var ScreenShield = class {
vertical: true,
style_class: 'screen-shield-contents-box' });
this._clock = new Clock();
- this._lockScreenContentsBox.add(this._clock.actor, { x_fill: true,
- y_fill: true });
+ this._lockScreenContentsBox.add_child(this._clock.actor);
this._lockScreenContents.add_actor(this._lockScreenContentsBox);
this._notificationsBox = new NotificationsBox();
this._wakeUpScreenId = this._notificationsBox.connect('wake-up-screen',
this._wakeUpScreen.bind(this));
- this._lockScreenContentsBox.add(this._notificationsBox.actor, { x_fill: true,
- y_fill: true,
- expand: true });
+ this._lockScreenContentsBox.add_child(this._notificationsBox.actor);
this._hasLockScreen = true;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]