Change panel layout. Add title and move back button
This commit is contained in:
@@ -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]))
|
||||
|
Reference in New Issue
Block a user