From 8a480254cd7abe6d4e1f43fa56fccb2b7aa734a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9gory=20Soutad=C3=A9?= Date: Wed, 18 Nov 2020 16:17:13 +0100 Subject: [PATCH] Add picture into an inner layout in order to avoid parent resize --- extension.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/extension.js b/extension.js index a0f0ea3..b989651 100644 --- a/extension.js +++ b/extension.js @@ -273,7 +273,11 @@ class MonitorWidget extends PanelMenu.Button { picture.set_size((width != -1)?width:initial_pixbuf.get_width(), (height != -1)?height:initial_pixbuf.get_height()); - return picture; + // Pack it in a box to avoid picture resize + let box = new St.BoxLayout({}); + box.add_child(picture); + + return box; } _manageEventAction(action) {