From a6f2fa8a88b0903ef824c2a73792629b77c8f551 Mon Sep 17 00:00:00 2001 From: filipriec Date: Mon, 7 Apr 2025 14:05:28 +0200 Subject: [PATCH] button highlight now working perfectly well --- client/src/components/auth/login.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/components/auth/login.rs b/client/src/components/auth/login.rs index 63d3b71..d9a35f7 100644 --- a/client/src/components/auth/login.rs +++ b/client/src/components/auth/login.rs @@ -77,7 +77,7 @@ pub fn render_login( // Login Button let login_button_index = 0; - let login_active = if app_state.current_mode == AppMode::General && app_state.ui.focus_outside_canvas { + let login_active = if app_state.ui.focus_outside_canvas { app_state.general.selected_item == login_button_index } else { false @@ -104,7 +104,7 @@ pub fn render_login( // Return Button let return_button_index = 1; // Assuming Return is the second general element - let return_active = if app_state.current_mode == AppMode::General && app_state.ui.focus_outside_canvas { + let return_active = if app_state.ui.focus_outside_canvas { app_state.general.selected_item == return_button_index } else { false // Not active if focus is in canvas or other modes