From a3e6cfbf053e46158036728cbcd9d8bd9f99d5e5 Mon Sep 17 00:00:00 2001 From: Cameron Clough Date: Mon, 19 May 2025 17:03:16 +0100 Subject: [PATCH] caps --- system/ui/widgets/network.py | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/system/ui/widgets/network.py b/system/ui/widgets/network.py index 8b5dd4d514..1a16eb3717 100644 --- a/system/ui/widgets/network.py +++ b/system/ui/widgets/network.py @@ -135,16 +135,14 @@ class WifiManagerUI: if status_text: 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) - else: - # If the network is saved, show the "Forget" button - if network.is_saved: - forget_btn_rect = rl.Rectangle(security_icon_rect.x - self.btn_width - spacing, - rect.y + (ITEM_HEIGHT - 80) / 2, - 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) + elif network.is_saved: + forget_btn_rect = rl.Rectangle(security_icon_rect.x - self.btn_width - spacing, + rect.y + (ITEM_HEIGHT - 80) / 2, + 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) self._draw_status_icon(security_icon_rect, network) self._draw_signal_strength_icon(signal_icon_rect, network)