Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

ui: Center `Checkbox` within its container (#9201)

Marshall Bowers14a0d8039b9d
diff --git a/crates/ui/src/components/checkbox/checkbox.rs b/crates/ui/src/components/checkbox/checkbox.rs
index d0750f73896..a04a0a4a909 100644
--- a/crates/ui/src/components/checkbox/checkbox.rs
+++ b/crates/ui/src/components/checkbox/checkbox.rs
@@ -100,6 +100,8 @@ impl RenderOnce for Checkbox {
h_flex()
.id(self.id)
+ .justify_center()
+ .items_center()
// Rather than adding `px_1()` to add some space around the checkbox,
// we use a larger parent element to create a slightly larger
// click area for the checkbox.