From 34fde780fc00816c7068dc94715e37daf96334ca Mon Sep 17 00:00:00 2001 From: alfrix Date: Tue, 22 Nov 2022 14:07:22 -0300 Subject: [PATCH] fix temp panel in vertical mode with big font getting out of screen fixes #805 --- panels/temperature.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/panels/temperature.py b/panels/temperature.py index 1aa4b0f1..3cb643f8 100644 --- a/panels/temperature.py +++ b/panels/temperature.py @@ -71,18 +71,16 @@ class TemperaturePanel(ScreenPanel): cooldown = self._gtk.ButtonImage('cool-down', _('Cooldown'), "color4", .5, Gtk.PositionType.LEFT, 1) adjust = self._gtk.ButtonImage('fine-tune', None, "color3", 1, Gtk.PositionType.LEFT, 1) + cooldown.connect("clicked", self.set_temperature, "cooldown") + adjust.connect("clicked", self.switch_preheat_adjust) right = self._gtk.HomogeneousGrid() right.attach(cooldown, 0, 0, 2, 1) right.attach(adjust, 2, 0, 1, 1) if self.show_preheat: - right.attach(self.preheat(), 0, 1, 3, 4) + right.attach(self.preheat(), 0, 1, 3, 3) else: - right.attach(self.delta_adjust(), 0, 1, 3, 4) - - cooldown.connect("clicked", self.set_temperature, "cooldown") - adjust.connect("clicked", self.switch_preheat_adjust) - + right.attach(self.delta_adjust(), 0, 1, 3, 3) return right def switch_preheat_adjust(self, widget): @@ -104,8 +102,7 @@ class TemperaturePanel(ScreenPanel): self.labels[option].connect("clicked", self.set_temperature, option) self.labels['preheat_grid'].attach(self.labels[option], (i % 2), int(i / 2), 1, 1) i += 1 - scroll = Gtk.ScrolledWindow() - scroll.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC) + scroll = self._gtk.ScrolledWindow() scroll.add(self.labels["preheat_grid"]) return scroll