This commit is contained in:
2026-08-25 11:19:11 +07:00
parent edc9c21e68
commit 1794df2041
6 changed files with 74 additions and 87 deletions
+1 -1
View File
@@ -334,7 +334,7 @@ impl SignedTabGroupSkin {
// A bottom/right dock's only panel cannot be closed through the
// group (base keeps a dock's last group), but the skin handles that
// close by removing the whole dock, so the item is offered.
let closable = group.can_close()
let closable = group.is_closable()
|| (self.is_dock_root_group(group, cx).is_some()
&& group.active_panel().is_some_and(|panel| panel.closable(cx)));
let buttons = handle.and_then(|handle| handle.toolbar_buttons(window, cx));
+3 -3
View File
@@ -118,9 +118,9 @@ impl SignedTilesSkin {
let control = handle.and_then(|handle| handle.zoom_control(cx));
let zoomed = tile.is_zoomed();
let toolbar_zoom =
tile.can_zoom() && control.is_some_and(|control| control.toolbar_visible());
let menu_zoom = tile.can_zoom() && control.is_some_and(|control| control.menu_visible());
let closable = tile.can_close();
tile.is_zoomable() && control.is_some_and(|control| control.toolbar_visible());
let menu_zoom = tile.is_zoomable() && control.is_some_and(|control| control.menu_visible());
let closable = tile.is_closable();
let buttons = handle.and_then(|handle| handle.toolbar_buttons(window, cx));
let panel = handle.map(|handle| handle.panel());
@@ -122,7 +122,7 @@ impl IssuesView {
let panel = cx.new(|cx| IssueDetailView::new(self.store.clone(), issue_id, window, cx));
dock_area.update(cx, |dock_area, cx| {
dock_area.add_panel_view(panel_handle(panel), DockPlacement::Bottom, None, window, cx);
dock_area.add_panel_view(panel_handle(panel), DockPlacement::Center, None, window, cx);
});
}
@@ -125,7 +125,7 @@ impl PullRequestsView {
let panel = cx.new(|cx| PullRequestDetailView::new(self.store.clone(), pr_id, window, cx));
dock_area.update(cx, |dock_area, cx| {
dock_area.add_panel_view(panel_handle(panel), DockPlacement::Bottom, None, window, cx);
dock_area.add_panel_view(panel_handle(panel), DockPlacement::Center, None, window, cx);
});
}
@@ -133,14 +133,16 @@ impl PullRequestsView {
/// `pr_ix` the index of the pull request in the store's `pull_requests`.
fn render_row(&self, ix: usize, pr_ix: usize, cx: &mut Context<Self>) -> AnyElement {
let pr = &self.store.read(cx).pull_requests[pr_ix];
let pr_id = pr.id;
let title = activity_subject(pr);
let id_hex = pr.id.to_hex();
let age = relative_time(pr.created_at);
let status = self.store.read(cx).status_of(pr);
let profile = ProfileStore::global(cx).read(cx).get(&pr.pubkey);
let author = profile.name();
let picture = profile.picture();
let age = relative_time(pr.created_at);
let status = self.store.read(cx).status_of(pr);
let pr_id = pr.id;
h_flex()
.id(ix)
@@ -402,7 +404,6 @@ impl PullRequestsView {
})),
),
)
// Spacer: pushes the button to the right edge.
.child(div().flex_1())
.child(
BaseButton::new("new-pr")
+3 -2
View File
@@ -54,13 +54,14 @@ impl Workspace {
}
let dock = dock_for_pruning.clone();
cx.spawn_in(window, async move |_, window| {
_ = dock.update_in(window, |area, window, cx| {
dock.update_in(window, |area, window, cx| {
for placement in [DockPlacement::Bottom, DockPlacement::Right] {
if area.is_empty(placement, cx) {
area.remove_dock(placement, window, cx);
}
}
});
})
.ok();
})
.detach();
},