From e885a939baa45f8822e02a1e5b94cc4cf83fe8c3 Mon Sep 17 00:00:00 2001 From: Smit Barmase Date: Tue, 16 Sep 2025 20:06:32 +0530 Subject: [PATCH] git_ui: Add tooltip for branch picker items (#38261) Closes #38256 image Release Notes: - Added tooltip to Git branch picker items, making it easier to distinguish long branch names. --- crates/git_ui/src/branch_picker.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/crates/git_ui/src/branch_picker.rs b/crates/git_ui/src/branch_picker.rs index 42558b7b79bca1892b9d36ae4b39bb3cdb196d4f..9a0751c8eded6bbb2bb61e62723b03ef8a0a2149 100644 --- a/crates/git_ui/src/branch_picker.rs +++ b/crates/git_ui/src/branch_picker.rs @@ -521,6 +521,14 @@ impl PickerDelegate for BranchListDelegate { .inset(true) .spacing(ListItemSpacing::Sparse) .toggle_state(selected) + .tooltip({ + let branch_name = entry.branch.name().to_string(); + if entry.is_new { + Tooltip::text(format!("Create branch \"{}\"", branch_name)) + } else { + Tooltip::text(branch_name) + } + }) .child( v_flex() .w_full()