Add picture into an inner layout in order to avoid parent resize

This commit is contained in:
Grégory Soutadé 2020-11-18 16:17:13 +01:00
parent c5b9f25587
commit 8a480254cd

View File

@ -273,7 +273,11 @@ class MonitorWidget extends PanelMenu.Button {
picture.set_size((width != -1)?width:initial_pixbuf.get_width(), picture.set_size((width != -1)?width:initial_pixbuf.get_width(),
(height != -1)?height:initial_pixbuf.get_height()); (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) { _manageEventAction(action) {