Track all scroll events

Fancier Window Titles
pull/17/head
Micke Nordin 4 years ago
parent eb0f1fa5a8
commit c223d7d6f2
Signed by: micke
GPG Key ID: 014B273D614BE877

@ -54,6 +54,7 @@ class Hui(wx.Frame):
def add_bridges(self):
"""Add bridges to sizer, the entry point of the program
"""
self.SetTitle('Tinge - All Bridges')
if self.m_bridges:
for bridge in self.m_bridges:
btn: wx.Button = wx.Button(self.pnl, label=str(bridge))
@ -73,7 +74,8 @@ class Hui(wx.Frame):
Args:
groups (list[HueGroup]): The groups to display
"""
bridge_btn: wx.Button = wx.Button(self.pnl, label=str(self.cur_bridge))
self.SetTitle("Tinge - {}".format(self.cur_bridge.m_name))
bridge_btn: wx.Button = wx.Button(self.pnl, label="All Bridges")
self.sizer.Add(bridge_btn, 0, wx.EXPAND)
self.Bind(wx.EVT_BUTTON,
lambda event: self.add_bridges(), bridge_btn)
@ -101,7 +103,8 @@ class Hui(wx.Frame):
Args:
lights (list[HueLight]): The lights to display
"""
group_btn: wx.Button = wx.Button(self.pnl, label=str(self.cur_group))
self.SetTitle("Tinge - {}". format(self.cur_group))
group_btn: wx.Button = wx.Button(self.pnl, label=str(self.cur_bridge))
self.sizer.Add(group_btn, 0, wx.EXPAND)
self.Bind(wx.EVT_BUTTON,
lambda event: self.add_groups(self.cur_bridge.get_groups()), group_btn)
@ -179,6 +182,7 @@ class Hui(wx.Frame):
lightid (int): The light id of the light to display
"""
light: HueLight = self.cur_bridge.get_light_by_id(lightid)
self.SetTitle("Tinge - {}".format(light))
is_on: bool = light.is_on()
group: HueGroup = self.cur_group
group_btn: wx.Button = wx.Button(self.pnl, label=str(group))

@ -0,0 +1,4 @@
wxPython==4.0.7
toml==0.10.1
UPnPy==1.1.8
requests==2.25.1
Loading…
Cancel
Save