|
|
@ -86,12 +86,12 @@ class Hui(wx.Frame):
|
|
|
|
if group.is_any_on():
|
|
|
|
if group.is_any_on():
|
|
|
|
icon = self.m_on_icon
|
|
|
|
icon = self.m_on_icon
|
|
|
|
toggle_btn: wx.Button = wx.Button(self.pnl, label=icon)
|
|
|
|
toggle_btn: wx.Button = wx.Button(self.pnl, label=icon)
|
|
|
|
inner_sizer.Add(toggle_btn, 0, wx.EXPAND)
|
|
|
|
inner_sizer.Add(toggle_btn, 1, wx.EXPAND)
|
|
|
|
self.Bind(wx.EVT_BUTTON,
|
|
|
|
self.Bind(wx.EVT_BUTTON,
|
|
|
|
lambda event, mgroupid=groupid: self.toggle_group(mgroupid), toggle_btn)
|
|
|
|
lambda event, mgroupid=groupid: self.toggle_group(mgroupid), toggle_btn)
|
|
|
|
label: str = str(group)
|
|
|
|
label: str = str(group)
|
|
|
|
group_btn: wx.Button = wx.Button(self.pnl, label=label)
|
|
|
|
group_btn: wx.Button = wx.Button(self.pnl, label=label, style=wx.BU_LEFT)
|
|
|
|
inner_sizer.Add(group_btn, 0, wx.EXPAND)
|
|
|
|
inner_sizer.Add(group_btn, 4, wx.EXPAND)
|
|
|
|
self.Bind(wx.EVT_BUTTON,
|
|
|
|
self.Bind(wx.EVT_BUTTON,
|
|
|
|
lambda event, mgroupid=groupid: self.goto_group(mgroupid), group_btn)
|
|
|
|
lambda event, mgroupid=groupid: self.goto_group(mgroupid), group_btn)
|
|
|
|
self.sizer.Add(inner_sizer, 0, wx.EXPAND)
|
|
|
|
self.sizer.Add(inner_sizer, 0, wx.EXPAND)
|
|
|
@ -115,13 +115,13 @@ class Hui(wx.Frame):
|
|
|
|
if light.is_on():
|
|
|
|
if light.is_on():
|
|
|
|
icon = self.m_on_icon
|
|
|
|
icon = self.m_on_icon
|
|
|
|
toggle_btn: wx.Button = wx.Button(self.pnl, label=icon)
|
|
|
|
toggle_btn: wx.Button = wx.Button(self.pnl, label=icon)
|
|
|
|
inner_sizer.Add(toggle_btn, 0, wx.EXPAND)
|
|
|
|
inner_sizer.Add(toggle_btn, 1, wx.EXPAND)
|
|
|
|
self.Bind(wx.EVT_BUTTON,
|
|
|
|
self.Bind(wx.EVT_BUTTON,
|
|
|
|
lambda event, mlightid=lightid: self.toggle_light_and_goto_group(mlightid, lights),
|
|
|
|
lambda event, mlightid=lightid: self.toggle_light_and_goto_group(mlightid, lights),
|
|
|
|
toggle_btn)
|
|
|
|
toggle_btn)
|
|
|
|
label: str = "{}".format(light)
|
|
|
|
label: str = "{}".format(light)
|
|
|
|
light_btn: wx.Button = wx.Button(self.pnl, label=label)
|
|
|
|
light_btn: wx.Button = wx.Button(self.pnl, label=label, style=wx.BU_LEFT)
|
|
|
|
inner_sizer.Add(light_btn, 0, wx.EXPAND)
|
|
|
|
inner_sizer.Add(light_btn, 4, wx.EXPAND)
|
|
|
|
self.Bind(wx.EVT_BUTTON,
|
|
|
|
self.Bind(wx.EVT_BUTTON,
|
|
|
|
lambda event, mlightid=lightid: self.goto_light(mlightid), light_btn)
|
|
|
|
lambda event, mlightid=lightid: self.goto_light(mlightid), light_btn)
|
|
|
|
self.sizer.Add(inner_sizer, 0, wx.EXPAND)
|
|
|
|
self.sizer.Add(inner_sizer, 0, wx.EXPAND)
|
|
|
|