style: deprecate active_device class

This commit is contained in:
alfrix 2022-07-04 13:46:04 -03:00
parent 9833b887ad
commit f97bed826b
3 changed files with 5 additions and 9 deletions

View File

@ -260,7 +260,7 @@ class MainPanel(MenuPanel):
self.labels['popover'].show_all()
def hide_numpad(self, widget):
self.devices[self.active_heater]['name'].get_style_context().remove_class("active_device")
self.devices[self.active_heater]['name'].get_style_context().remove_class("button_active")
self.active_heater = None
if self._screen.vertical_mode:
@ -313,9 +313,9 @@ class MainPanel(MenuPanel):
def show_numpad(self, widget):
if self.active_heater is not None:
self.devices[self.active_heater]['name'].get_style_context().remove_class("active_device")
self.devices[self.active_heater]['name'].get_style_context().remove_class("button_active")
self.active_heater = self.popover_device
self.devices[self.active_heater]['name'].get_style_context().add_class("active_device")
self.devices[self.active_heater]['name'].get_style_context().add_class("button_active")
if "keypad" not in self.labels:
self.labels["keypad"] = Keypad(self._screen, self.change_target_temp, self.hide_numpad)

View File

@ -201,11 +201,11 @@ class TemperaturePanel(ScreenPanel):
if self.devices[device]["can_target"]:
if device in self.active_heaters:
self.active_heaters.pop(self.active_heaters.index(device))
self.devices[device]['name'].get_style_context().remove_class("active_device")
self.devices[device]['name'].get_style_context().remove_class("button_active")
self.devices[device]['select'].set_label(_("Select"))
return
self.active_heaters.append(device)
self.devices[device]['name'].get_style_context().add_class("active_device")
self.devices[device]['name'].get_style_context().add_class("button_active")
self.devices[device]['select'].set_label(_("Deselect"))
return

View File

@ -186,10 +186,6 @@ trough {
/*border-right: 2px solid #444;*/
}
.active_device {
background-color: #20303D;
}
.content {
margin: 0 .1em;
}