main_menu: Show printer name in main_menu

This commit is contained in:
Jordan Ruthe 2021-02-15 14:52:09 -05:00
parent 57aa7e6e85
commit 49f7cf0e46

View File

@ -12,14 +12,15 @@ def create_panel(*args):
return MainPanel(*args) return MainPanel(*args)
class MainPanel(MenuPanel): class MainPanel(MenuPanel):
def __init__(self, screen, title, back=False):
super().__init__(screen, title, False)
def initialize(self, panel_name, items, extrudercount): def initialize(self, panel_name, items, extrudercount):
print("### Making MainMenu") print("### Making MainMenu")
self.layout = Gtk.Layout()
self.layout.set_size(self._screen.width, self._screen.height)
grid = self._gtk.HomogeneousGrid() grid = self._gtk.HomogeneousGrid()
grid.set_size_request(self._screen.width, self._screen.height) grid.set_hexpand(True)
grid.set_vexpand(True)
# Create Extruders and bed icons # Create Extruders and bed icons
eq_grid = self._gtk.HomogeneousGrid() eq_grid = self._gtk.HomogeneousGrid()
@ -56,7 +57,9 @@ class MainPanel(MenuPanel):
"heater_bed": 0, "heater_bed": 0,
"extruder": 0 "extruder": 0
} }
self.layout.put(grid, 0, 0)
self.content.add(self.grid)
self.layout.show_all()
self._screen.add_subscription(panel_name) self._screen.add_subscription(panel_name)