forked from CreatBot/CreatBotKlipperScreen
screen: simplify panel loading
this removes create_panel function from panels and mandates a class name Panel remove panel_type param and only use a panel_name that is it's filename remove load_panel dict always reinit panel, (simpler and safer but slower)
This commit is contained in:
@@ -2,15 +2,10 @@ import gi
|
||||
|
||||
gi.require_version("Gtk", "3.0")
|
||||
from gi.repository import Gtk
|
||||
|
||||
from ks_includes.screen_panel import ScreenPanel
|
||||
|
||||
|
||||
def create_panel(*args):
|
||||
return ExamplePanel(*args)
|
||||
|
||||
|
||||
class ExamplePanel(ScreenPanel):
|
||||
class Panel(ScreenPanel):
|
||||
def __init__(self, screen, title):
|
||||
super().__init__(screen, title)
|
||||
|
||||
|
Reference in New Issue
Block a user