Temp_panel: put devices in a scroll (#436)
* Temp_panel: put devices in a scroll * Tweak margins * Tpanel: Fix whitespace in message * Fix #429 temperature_fan not updating target
This commit is contained in:
parent
8dd5c64006
commit
5d3bae8ff9
@ -188,7 +188,7 @@ class Printer:
|
||||
|
||||
def get_fans(self):
|
||||
fans = ["fan"] if len(self.get_config_section_list("fan")) > 0 else []
|
||||
fan_types = ["controller_fan", "fan_generic", "heater_fan", "temperature_fan"]
|
||||
fan_types = ["controller_fan", "fan_generic", "heater_fan"]
|
||||
for type in fan_types:
|
||||
for f in self.get_config_section_list("%s " % type):
|
||||
fans.append(f)
|
||||
|
@ -340,7 +340,7 @@ class TemperaturePanel(ScreenPanel):
|
||||
self._screen._ws.klippy.set_temp_fan_temp(" ".join(self.active_heater.split(" ")[1:]), temp)
|
||||
else:
|
||||
logging.info("Unknown heater: %s" % self.active_heater)
|
||||
self._screen.show_popup_message(_("Unknown Heater ") + self.active_heater)
|
||||
self._screen.show_popup_message(_("Unknown Heater") + self.active_heater)
|
||||
self._printer.set_dev_stat(self.active_heater, "target", temp)
|
||||
|
||||
def create_left_panel(self):
|
||||
@ -361,10 +361,17 @@ class TemperaturePanel(ScreenPanel):
|
||||
da.set_vexpand(True)
|
||||
self.labels['da'] = da
|
||||
|
||||
scroll = Gtk.ScrolledWindow()
|
||||
scroll.set_property("overlay-scrolling", False)
|
||||
scroll.set_hexpand(True)
|
||||
scroll.set_vexpand(True)
|
||||
scroll.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC)
|
||||
scroll.add(self.labels['devices'])
|
||||
|
||||
box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=0)
|
||||
box.set_vexpand(True)
|
||||
box.add(self.labels['devices'])
|
||||
box.add(da)
|
||||
box.add(scroll)
|
||||
box.add(self.labels['da'])
|
||||
|
||||
|
||||
self.labels['graph_settemp'] = self._gtk.Button(label=_("Set Temp"))
|
||||
@ -380,9 +387,10 @@ class TemperaturePanel(ScreenPanel):
|
||||
popover.set_position(Gtk.PositionType.BOTTOM)
|
||||
self.labels['popover'] = popover
|
||||
|
||||
for d in self._printer.get_temp_store_devices():
|
||||
for i, d in enumerate(self._printer.get_temp_store_devices(), start=3):
|
||||
self.add_device(d)
|
||||
|
||||
graph_height = max(0, self._screen.height - (i * 6 * self._gtk.get_font_size()))
|
||||
self.labels['da'].set_size_request(0, graph_height)
|
||||
return box
|
||||
|
||||
|
||||
|
@ -256,12 +256,13 @@ trough {
|
||||
}
|
||||
|
||||
.heater-grid {
|
||||
margin-right: .5em;
|
||||
margin-right: .1em;
|
||||
}
|
||||
|
||||
.heater-grid label {
|
||||
margin-top: .3em;
|
||||
margin-bottom: .3em;
|
||||
margin-top: .2em;
|
||||
margin-bottom: .2em;
|
||||
min-height: 2em;
|
||||
}
|
||||
|
||||
.message_popup {
|
||||
|
Loading…
x
Reference in New Issue
Block a user