pull/35284/head
Cameron Clough 6 days ago
parent a3c31f73a2
commit a3e6cfbf05
  1. 18
      system/ui/widgets/network.py

@ -135,16 +135,14 @@ class WifiManagerUI:
if status_text: if status_text:
status_text_rect = rl.Rectangle(security_icon_rect.x - 410, rect.y, 410, ITEM_HEIGHT) status_text_rect = rl.Rectangle(security_icon_rect.x - 410, rect.y, 410, ITEM_HEIGHT)
gui_label(status_text_rect, status_text, font_size=48, alignment=rl.GuiTextAlignment.TEXT_ALIGN_CENTER) gui_label(status_text_rect, status_text, font_size=48, alignment=rl.GuiTextAlignment.TEXT_ALIGN_CENTER)
else: elif network.is_saved:
# If the network is saved, show the "Forget" button forget_btn_rect = rl.Rectangle(security_icon_rect.x - self.btn_width - spacing,
if network.is_saved: rect.y + (ITEM_HEIGHT - 80) / 2,
forget_btn_rect = rl.Rectangle(security_icon_rect.x - self.btn_width - spacing, self.btn_width,
rect.y + (ITEM_HEIGHT - 80) / 2, 80,
self.btn_width, )
80, if isinstance(self.state, StateIdle) and gui_button(forget_btn_rect, "FORGET", button_style=ButtonStyle.ACTION) and clicked:
) self.state = StateShowForgetConfirm(network)
if isinstance(self.state, StateIdle) and gui_button(forget_btn_rect, "Forget", button_style=ButtonStyle.ACTION) and clicked:
self.state = StateShowForgetConfirm(network)
self._draw_status_icon(security_icon_rect, network) self._draw_status_icon(security_icon_rect, network)
self._draw_signal_strength_icon(signal_icon_rect, network) self._draw_signal_strength_icon(signal_icon_rect, network)

Loading…
Cancel
Save