temperature: fix blank space if the special cooldown is not at the bottom of the config #688
This commit is contained in:
parent
455cb9da99
commit
83c6f87281
@ -92,11 +92,13 @@ class TemperaturePanel(ScreenPanel):
|
||||
|
||||
def preheat(self):
|
||||
self.labels["preheat_grid"] = self._gtk.HomogeneousGrid()
|
||||
for i, option in enumerate(self.preheat_options):
|
||||
i = 0
|
||||
for option in self.preheat_options:
|
||||
if option != "cooldown":
|
||||
self.labels[option] = self._gtk.Button(option, f"color{(i % 4) + 1}")
|
||||
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.add(self.labels["preheat_grid"])
|
||||
|
Loading…
x
Reference in New Issue
Block a user