messageList: Always show close button when message is closable
Once we add a expand button, which we want to show always, the close button would look odd if it hides automatically. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3173>
This commit is contained in:
parent
e334d5e575
commit
dc4e2e8114
@ -374,7 +374,6 @@ class MessageHeader extends St.BoxLayout {
|
||||
style_class: 'message-close-button',
|
||||
icon_name: 'window-close-symbolic',
|
||||
y_align: Clutter.ActorAlign.CENTER,
|
||||
opacity: 0,
|
||||
});
|
||||
this.add_child(this.closeButton);
|
||||
|
||||
@ -499,9 +498,7 @@ export const Message = GObject.registerClass({
|
||||
this.connect('destroy', this._onDestroy.bind(this));
|
||||
|
||||
this._header.closeButton.connect('clicked', this.close.bind(this));
|
||||
let actorHoverId = this.connect('notify::hover', this._sync.bind(this));
|
||||
this._header.closeButton.connect('destroy', this.disconnect.bind(this, actorHoverId));
|
||||
this._sync();
|
||||
this._header.closeButton.visible = this.canClose();
|
||||
}
|
||||
|
||||
close() {
|
||||
@ -627,12 +624,6 @@ export const Message = GObject.registerClass({
|
||||
return false;
|
||||
}
|
||||
|
||||
_sync() {
|
||||
let visible = this.hover && this.canClose();
|
||||
this._header.closeButton.opacity = visible ? 255 : 0;
|
||||
this._header.closeButton.reactive = visible;
|
||||
}
|
||||
|
||||
_onDestroy() {
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user