From dc4e2e8114aa57ac8daf469d1aaf40b0387b3f13 Mon Sep 17 00:00:00 2001 From: Julian Sparber Date: Wed, 10 Jan 2024 11:08:01 +0100 Subject: [PATCH] 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: --- js/ui/messageList.js | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/js/ui/messageList.js b/js/ui/messageList.js index 670e2f5df..4fea3a15e 100644 --- a/js/ui/messageList.js +++ b/js/ui/messageList.js @@ -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() { }