move: settings button relocation for vertical mode

This commit is contained in:
alfrix authored and Alfredo Monclus committed 2023-08-18 11:48:37 -03:00
1 parent 35007af482
commit 1c06e55442
1 file changed
+6 -4
+6 -4
View File
@@ -36,6 +36,9 @@ class Panel(ScreenPanel):
self.buttons['motors_off'].connect("clicked", self._screen._confirm_send_action,
_("Are you sure you wish to disable motors?"),
"printer.gcode.script", script)
adjust = self._gtk.Button("settings", None, "color2", 1, Gtk.PositionType.LEFT, 1)
adjust.connect("clicked", self.load_menu, 'options', _('Settings'))
adjust.set_hexpand(False)
grid = self._gtk.HomogeneousGrid()
if self._screen.vertical_mode:
if self._screen.lang_ltr:
@@ -48,6 +51,7 @@ class Panel(ScreenPanel):
grid.attach(self.buttons['x-'], 2, 1, 1, 1)
grid.attach(self.buttons['z+'], 0, 2, 1, 1)
grid.attach(self.buttons['z-'], 2, 2, 1, 1)
grid.attach(adjust, 1, 2, 1, 1)
grid.attach(self.buttons['y+'], 1, 0, 1, 1)
grid.attach(self.buttons['y-'], 1, 1, 1, 1)
@@ -84,9 +88,6 @@ class Panel(ScreenPanel):
for p in ('pos_x', 'pos_y', 'pos_z'):
self.labels[p] = Gtk.Label()
adjust = self._gtk.Button("settings", None, "color2", 1, Gtk.PositionType.LEFT, 1)
adjust.connect("clicked", self.load_menu, 'options', _('Settings'))
adjust.set_hexpand(False)
self.labels['move_dist'] = Gtk.Label(_("Move Distance (mm)"))
bottomgrid = self._gtk.HomogeneousGrid()
@@ -95,7 +96,8 @@ class Panel(ScreenPanel):
bottomgrid.attach(self.labels['pos_y'], 1, 0, 1, 1)
bottomgrid.attach(self.labels['pos_z'], 2, 0, 1, 1)
bottomgrid.attach(self.labels['move_dist'], 0, 1, 3, 1)
bottomgrid.attach(adjust, 3, 0, 1, 2)
if not self._screen.vertical_mode:
bottomgrid.attach(adjust, 3, 0, 1, 2)
self.labels['move_menu'] = self._gtk.HomogeneousGrid()
self.labels['move_menu'].attach(grid, 0, 0, 1, 3)