bed_mesh: adjust vertical mode

This commit is contained in:
alfrix 2022-11-12 10:11:09 -03:00
parent 4d0edf3c0b
commit 2aec78ff4c

View File

@ -57,8 +57,13 @@ class BedMeshPanel(ScreenPanel):
grid.set_row_homogeneous(False)
grid.attach(topbar, 0, 0, 2, 1)
self.labels['map'] = BedMap(self._gtk.get_font_size(), self.active_mesh)
grid.attach(self.labels['map'], 0, 2, 1, 1)
grid.attach(scroll, 1, 2, 1, 1)
if self._screen.vertical_mode:
grid.attach(self.labels['map'], 0, 2, 2, 1)
grid.attach(scroll, 0, 3, 2, 1)
self.labels['map'].set_size_request(self._gtk.get_content_width(), self._gtk.get_content_height() * .4)
else:
grid.attach(self.labels['map'], 0, 2, 1, 1)
grid.attach(scroll, 1, 2, 1, 1)
self.labels['main_grid'] = grid
self.content.add(self.labels['main_grid'])