Resize handles: the line is a filled hairline, since gpui paints a border no wider than half its box: a split's divider, a resizable box's edge and a column's border drew half a pixel, and none at a scale of one
CI / site (push) Successful in 25s
CI / platforms (windows-latest) (push) Successful in 4m36s
CI / crate (push) Failing after 12m30s
CI / platforms (ubuntu-24.04) (push) Canceled after 0s

This commit is contained in:
ZacharyZhang-NY committed 2026-10-16 20:10:03 -04:00
1 parent 5c2822cfb6
commit 005faefd5d
2 files changed
+8 -7

No files matched your search

+7 -6
View File
@@ -29,6 +29,7 @@ fn handle(id: impl Into<ElementId>, axis: Axis, line: Hsla, cx: &App) -> Statefu
.flex()
.justify_center()
.items_center();
// A filled line: gpui paints a border no wider than half its box.
match axis {
Axis::Horizontal => base
.w(hit)
@@ -36,10 +37,10 @@ fn handle(id: impl Into<ElementId>, axis: Axis, line: Hsla, cx: &App) -> Statefu
.cursor(CursorStyle::ResizeLeftRight)
.child(
div()
.w_px()
.h_full()
.border_l_1()
.border_color(line)
.group_hover("resize", |s| s.border_color(lit)),
.bg(line)
.group_hover("resize", |s| s.bg(lit)),
),
Axis::Vertical => base
.h(hit)
@@ -47,10 +48,10 @@ fn handle(id: impl Into<ElementId>, axis: Axis, line: Hsla, cx: &App) -> Statefu
.cursor(CursorStyle::ResizeUpDown)
.child(
div()
.h_px()
.w_full()
.border_t_1()
.border_color(line)
.group_hover("resize", |s| s.border_color(lit)),
.bg(line)
.group_hover("resize", |s| s.bg(lit)),
),
}
}