feat: remove extra btns in the toolbar

This commit is contained in:
2026-06-07 21:12:40 +01:00
parent f5b6701fbd
commit 51eb5a1590

View File

@@ -141,27 +141,6 @@ impl PullRequestView {
cx.notify();
})),
)
.child(div().flex_1())
.child(
toolbar_button("pr-close-btn")
.leading(font_icon(FontIcon::PullRequestClosed))
.mr_1(),
)
.child(
toolbar_button("pr-merge-btn")
.variant(button::Variant::Primary)
.leading(font_icon(FontIcon::GitMerge))
.rounded_r_none(),
)
.child(divider())
.child(
toolbar_button("chevron")
.py_1()
.px_0p5()
.variant(button::Variant::Primary)
.leading(font_icon(FontIcon::ChevronDown))
.rounded_l_none(),
)
.into_any_element()
}
@@ -354,7 +333,8 @@ impl gpui::Render for PullRequestView {
.flex_col()
.child(self.toolbar(cx))
.child(match &self.pull_request_query {
| Some(q) => match read_query(q, cx) {
| Some(q) => {
match read_query(q, cx) {
| QueryStatus::Loaded(pr) => match (&self.diff_view, self.current_tab) {
| (Some(diff_view), Tab::DiffView) => diff_view.clone().into_any_element(),
| _ => self.pr_content(pr, cx),
@@ -368,7 +348,8 @@ impl gpui::Render for PullRequestView {
.size_full()
.child("loading pr content")
.into_any_element(),
},
}
}
| None => div().size_full().child("no pr selected").into_any_element(),
})