From 362c69ca9dcfe35ab2b576f658e1cacc42a19a17 Mon Sep 17 00:00:00 2001 From: Erik Kundt Date: Mon, 2 Sep 2024 10:58:13 +0200 Subject: [PATCH] lib: Fix focus in imUI text edit --- src/ui/im.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/ui/im.rs b/src/ui/im.rs index cf49781e..46899ffb 100644 --- a/src/ui/im.rs +++ b/src/ui/im.rs @@ -1387,15 +1387,11 @@ pub mod widget { cursor: *self.cursor, }; - // let focus = !render.focus; - let focus = true; - - // let input = self.text.as_str(); let label_content = format!(" {} ", self.label.unwrap_or_default()); let overline = String::from("▔").repeat(area.width as usize); let cursor_pos = *self.cursor as u16; - let (label, input, overline) = if !focus && self.dim { + let (label, input, overline) = if !has_focus && self.dim { ( Span::from(label_content.clone()).magenta().dim().reversed(), Span::from(state.text.clone()).reset().dim(),