make the menu icon non-mandatory

this was caused by #866
fixes #902
This commit is contained in:
alfrix 2023-02-20 07:54:57 -06:00
parent e426b06b8b
commit d6693fbecc

View File

@ -81,7 +81,7 @@ class MenuPanel(ScreenPanel):
printer = self._printer.get_printer_status_data()
name = env.from_string(item['name']).render(printer)
icon = env.from_string(item['icon']).render(printer)
icon = env.from_string(item['icon']).render(printer) if item['icon'] else None
style = env.from_string(item['style']).render(printer) if item['style'] else None
b = self._gtk.Button(icon, name, (style if style else f"color{(i % 4) + 1}"))