tui: misc fixes - var/comments
tui: misc fixes - var/comments
This commit is contained in:
commit
6a7964285e
1 changed files with 2 additions and 3 deletions
|
@ -155,8 +155,8 @@ class MiscDisplay(Static):
|
|||
fan_rpm = reactive(0)
|
||||
fan_rpm_target = reactive(0)
|
||||
# do some dancing to craft the UI; initialize the reactive obj with data
|
||||
# to get proper labels
|
||||
# dynamic object for temperature updates
|
||||
# populated / looped in '__init__' to get proper labels
|
||||
temp_stats = reactive({})
|
||||
# default to 'not composed', once labels are made - become true
|
||||
# avoids a race condition between discovering temperature nodes/stats
|
||||
|
@ -167,13 +167,12 @@ class MiscDisplay(Static):
|
|||
super().__init__(*args, **kwargs)
|
||||
self.timer_misc = None
|
||||
self.card = card
|
||||
self.initial_stats = get_temp_stats(self.card)
|
||||
self.temp_stats = get_temp_stats(self.card)
|
||||
|
||||
def compose(self) -> ComposeResult:
|
||||
yield Horizontal(Label("[underline]Temperatures"),
|
||||
Label("", classes="statvalue"))
|
||||
for temp_node in self.initial_stats:
|
||||
for temp_node in self.temp_stats:
|
||||
# capitalize the first letter for display
|
||||
caption = temp_node[0].upper() + temp_node[1:]
|
||||
yield Horizontal(Label(f' {caption}:',),
|
||||
|
|
Reference in a new issue