diff --git a/crates/ui/src/input/element.rs b/crates/ui/src/input/element.rs index e35716e0..baf78cec 100644 --- a/crates/ui/src/input/element.rs +++ b/crates/ui/src/input/element.rs @@ -504,6 +504,14 @@ impl Element for TextElement { let origin = bounds.origin; let mut offset_y = px(0.); + if self.input.read(cx).masked { + // Move down offset for vertical centering the ***** + if cfg!(target_os = "macos") { + offset_y = px(3.); + } else { + offset_y = px(2.5); + } + } for line in prepaint.lines.iter() { let p = point(origin.x, origin.y + offset_y); _ = line.paint(p, line_height, window, cx);