table: Fix selected row top, bottom border detail.

This commit is contained in:
Jason Lee 2024-10-18 14:13:15 +08:00
parent a4260c109f
commit 274b9edc32

View file

@ -1020,9 +1020,9 @@ where
this.when( this.when(
is_selected && self.selection_state == SelectionState::Row, is_selected && self.selection_state == SelectionState::Row,
|this| { |this| {
this.child( this.border_color(gpui::transparent_white()).child(
div() div()
.top(px(-1.)) .top(if row_ix == 0 { px(0.) } else { px(-1.) })
.left(px(0.)) .left(px(0.))
.right(px(0.)) .right(px(0.))
.bottom_0() .bottom_0()
@ -1036,9 +1036,9 @@ where
}) })
// Row right click row style // Row right click row style
.when(self.right_clicked_row == Some(row_ix), |this| { .when(self.right_clicked_row == Some(row_ix), |this| {
this.child( this.border_color(gpui::transparent_white()).child(
div() div()
.top(px(-1.)) .top(if row_ix == 0 { px(0.) } else { px(-1.) })
.left(px(0.)) .left(px(0.))
.right(px(0.)) .right(px(0.))
.bottom_0() .bottom_0()