diff --git a/data/theme/gnome-shell-sass/widgets/_message-list.scss b/data/theme/gnome-shell-sass/widgets/_message-list.scss index dbc813d49..0dc1ce3fe 100644 --- a/data/theme/gnome-shell-sass/widgets/_message-list.scss +++ b/data/theme/gnome-shell-sass/widgets/_message-list.scss @@ -99,18 +99,14 @@ font-weight: bold; } - // secondary container in title box - .message-secondary-bin { + // notification time stamp + > .event-time { + @extend %caption; + color: $insensitive_fg_color; + padding-bottom: to_em(1px); - // notification time stamp - > .event-time { - @extend %caption; - color: $insensitive_fg_color; - padding-bottom: to_em(1px); - - &:ltr { text-align: right }; - &:rtl { text-align: left }; - } + &:ltr { text-align: right }; + &:rtl { text-align: left }; } } diff --git a/js/ui/messageList.js b/js/ui/messageList.js index ab0f440da..d4967ebf6 100644 --- a/js/ui/messageList.js +++ b/js/ui/messageList.js @@ -409,12 +409,8 @@ export const Message = GObject.registerClass({ this.setTitle(title); titleBox.add_child(this.titleLabel); - this._secondaryBin = new St.Bin({ - style_class: 'message-secondary-bin', - x_expand: true, y_expand: true, - y_align: Clutter.ActorAlign.END, - }); - titleBox.add_child(this._secondaryBin); + this._timeLabel = new TimeLabel(); + titleBox.add_child(this._timeLabel); this._closeButton = new St.Button({ style_class: 'message-close-button', @@ -450,21 +446,11 @@ export const Message = GObject.registerClass({ } get datetime() { - if (this._secondaryBin.child instanceof TimeLabel) - return this._secondaryBin.child.datetime; - else - return null; + return this._timeLabel.datetime; } set datetime(datetime) { - if (!(this._secondaryBin.child instanceof TimeLabel)) - this._secondaryBin.child = new TimeLabel(); - - this._secondaryBin.child.set({datetime}); - } - - setSecondaryActor(actor) { - this._secondaryBin.child = actor; + this._timeLabel.datetime = datetime; } setTitle(text) { diff --git a/js/ui/mpris.js b/js/ui/mpris.js index c68df2f91..f155e3774 100644 --- a/js/ui/mpris.js +++ b/js/ui/mpris.js @@ -31,7 +31,7 @@ class MediaMessage extends MessageList.Message { this.setIcon(this._icon); // reclaim space used by unused elements - this._secondaryBin.hide(); + this._timeLabel.hide(); this._closeButton.hide(); this._prevButton = this.addMediaControl('media-skip-backward-symbolic',