refactor: add panel zoom and close toolbar
Rust / build (macos-latest, stable) (push) Waiting to run
Rust / build (ubuntu-latest, stable) (push) Waiting to run
Rust / build (windows-latest, stable) (push) Waiting to run
Rust / build (macos-latest, stable) (pull_request) Waiting to run
Rust / build (ubuntu-latest, stable) (pull_request) Waiting to run
Rust / build (windows-latest, stable) (pull_request) Waiting to run

This commit is contained in:
2026-11-24 10:35:57 +07:00
parent 3f9e4e1c12
commit 875e7f3582
7 changed files with 391 additions and 53 deletions
@@ -509,8 +509,9 @@ impl PullRequestDetailView {
.px_4()
.py_2()
.gap_2()
// The top right corner is the panel toolbar's.
.child(
h_flex().gap_2().child(status_badge(status)).child(
h_flex().gap_2().pr_16().child(status_badge(status)).child(
div()
.flex_1()
.min_w_0()
@@ -583,6 +584,10 @@ impl Panel for PullRequestDetailView {
fn loading(&self, _cx: &App) -> bool {
self.loading
}
fn toolbar(&self, _cx: &App) -> bool {
true
}
}
impl Render for PullRequestDetailView {
@@ -774,9 +774,11 @@ impl CommitDiffView {
.gap_2()
.border_b_1()
.border_color(cx.theme().colors.border)
// The top right corner is the panel toolbar's.
.child(
div()
.min_w_0()
.pr_16()
.font_semibold()
.truncate()
.text_ellipsis()
@@ -882,6 +884,10 @@ impl Panel for CommitDiffView {
fn loading(&self, _cx: &App) -> bool {
self.loading
}
fn toolbar(&self, _cx: &App) -> bool {
true
}
}
impl Render for CommitDiffView {