From 56c4992b9ac5c63534fb8cf63fb6536d9abe9a0f Mon Sep 17 00:00:00 2001 From: localcc Date: Mon, 11 Aug 2025 19:17:48 +0200 Subject: [PATCH] Fix underline flickering (#35989) Closes #35559 Release Notes: - Fixed underline flickering --- crates/gpui/src/scene.rs | 2 +- crates/gpui/src/window.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/gpui/src/scene.rs b/crates/gpui/src/scene.rs index c527dfe750..758d06e597 100644 --- a/crates/gpui/src/scene.rs +++ b/crates/gpui/src/scene.rs @@ -476,7 +476,7 @@ pub(crate) struct Underline { pub content_mask: ContentMask, pub color: Hsla, pub thickness: ScaledPixels, - pub wavy: bool, + pub wavy: u32, } impl From for Primitive { diff --git a/crates/gpui/src/window.rs b/crates/gpui/src/window.rs index 3a430b806d..c0ffd34a0d 100644 --- a/crates/gpui/src/window.rs +++ b/crates/gpui/src/window.rs @@ -2814,7 +2814,7 @@ impl Window { content_mask: content_mask.scale(scale_factor), color: style.color.unwrap_or_default().opacity(element_opacity), thickness: style.thickness.scale(scale_factor), - wavy: style.wavy, + wavy: if style.wavy { 1 } else { 0 }, }); } @@ -2845,7 +2845,7 @@ impl Window { content_mask: content_mask.scale(scale_factor), thickness: style.thickness.scale(scale_factor), color: style.color.unwrap_or_default().opacity(opacity), - wavy: false, + wavy: 0, }); }