Track all scroll events
Fancier Window Titles
This commit is contained in:
parent
eb0f1fa5a8
commit
c223d7d6f2
2 changed files with 10 additions and 2 deletions
8
main.py
8
main.py
|
@ -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))
|
||||
|
|
4
requirements.txt
Normal file
4
requirements.txt
Normal file
|
@ -0,0 +1,4 @@
|
|||
wxPython==4.0.7
|
||||
toml==0.10.1
|
||||
UPnPy==1.1.8
|
||||
requests==2.25.1
|
Loading…
Add table
Reference in a new issue