git.lucas.co / cce-ui
GPU-accelerated UI toolkit (Vulkan)
git clone https://git.lucas.co/cce-ui.git

commit5d6ff01b671ca79e568ba97087529067fed5f258
parent69013f0877
authorLucas Galante <[email protected]>
date2026-07-28 23:31
style: drop the focus wash on multiline TextBoxes

The shared focus-highlight overlay screens the whole widget with the
highlight primary — control-scale on a single-line box, but a full-pane
teal wash on a multiline editor (data-editor's raw KDL pane). Multiline
editors read focus from their editing border instead; single-line boxes
keep the tint.

Co-Authored-By: Claude Fable 5 <[email protected]>

 src/widget/input/text_box.rs | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/widget/input/text_box.rs b/src/widget/input/text_box.rs
index ca8930f..ec6c311 100644
--- a/src/widget/input/text_box.rs
+++ b/src/widget/input/text_box.rs
@@ -1149,9 +1149,11 @@ impl Paint for TextBox {
     }
 
     /// Legacy TextBox kept the shared focus-highlight overlay (the focused editor's
-    /// primary-tint wash — data-editor's teal editing surface).
+    /// primary-tint wash). Only single-line boxes keep it — a control-scale tint.
+    /// On a multiline editor the wash screens the whole pane (data-editor's teal
+    /// editing surface); pane-scale focus reads from the editing border instead.
     fn legacy_focus_highlight(&self) -> bool {
-        true
+        !self.multiline
     }
 
     fn text_bounds(&self, rect: Rect) -> Option<[f32; 4]> {