fix(panel): start Info and Changes flush under the tab row

Their first line is text centred in a 28px row, so the extra 8px step put
it visibly lower than the Files tab's search well. Only Files keeps it.
This commit is contained in:
l0ng-ai
2026-09-24 20:24:40 +08:00
parent ac3acae783
commit e5908a945e
2 changed files with 15 additions and 5 deletions
+10 -1
View File
@@ -589,7 +589,16 @@ impl Tty7App {
cx,
))
}))
.children(cfg!(target_os = "macos").then(|| div().flex_none().h(px(8.))))
// Only the Files tab steps down 8px. Its first row is a filled
// search well whose top edge is the first thing you see, so it
// wants air under the tab row. Info and Source Control open on
// bare text centred in a 28px row, which already sits ~7px
// under the row's top; adding 8 more put their first line a
// visible step lower than the Files well beside them.
.children(
(cfg!(target_os = "macos") && tab == RightPanelTab::Files)
.then(|| div().flex_none().h(px(8.))),
)
.child(body)
.children(self.sftp_transfers_footer(cx))
.child(handle)
+5 -4
View File
@@ -118,10 +118,11 @@ const COMMIT_RADIUS: gpui::Pixels = px(6.);
/// one unit: 8px under the tab row, 10px between its three parts and 14px
/// before the first group.
///
/// On macOS the panel already puts 8px between its tab row and every tab's
/// body (`render_right_panel`), so the block adds nothing of its own there;
/// adding it anyway put the branch 16px down while Info and Files started at
/// 8. Elsewhere the tab row is inside the body and the 8 is this block's.
/// On macOS the block starts flush under the tab row, the way Info does: the
/// branch is text centred in a 28px row, so it already sits ~7px down, level
/// with the top edge of the Files tab's search well (which does get an 8px
/// step, see `render_right_panel`). Elsewhere the tab row is inside the body
/// and the 8 is this block's.
const PINNED_TOP: f32 = if cfg!(target_os = "macos") { 0. } else { 8. };
const PINNED_GAP: f32 = 10.;
const PINNED_BOTTOM: f32 = 14.;