Change panel layout. Add title and move back button

This commit is contained in:
Jordan Ruthe
2020-12-02 14:35:28 -05:00
parent 6d71022dbf
commit 08a7057668
25 changed files with 283 additions and 188 deletions

View File

@@ -94,19 +94,13 @@ class MovePanel(ScreenPanel):
grid.attach(box, 0, 2, 3, 1)
b = KlippyGtk.ButtonImage('back', _('Back'))
b.connect("clicked", self._screen._menu_go_back)
grid.attach(b, 3, 2, 1, 1)
self.panel = grid
self.content.add(grid)
self._screen.add_subscription(panel_name)
def process_update(self, action, data):
if action != "notify_status_update":
return
if "toolhead" in data and "position" in data["toolhead"]:
self.labels['pos_x'].set_text("X: %.2f" % (data["toolhead"]["position"][0]))
self.labels['pos_y'].set_text("Y: %.2f" % (data["toolhead"]["position"][1]))