git_ui: Add tooltip for branch picker items (#38261)

Closes #38256

<img width="300" alt="image"
src="https://github.com/user-attachments/assets/5018951f-0f1b-4d5d-b59d-5b5266380e43"
/>


Release Notes:

- Added tooltip to Git branch picker items, making it easier to
distinguish long branch names.
This commit is contained in:
Smit Barmase
2025-09-16 20:06:32 +05:30
committed by GitHub
parent a01a2ed0e0
commit e885a939ba
+8
View File
@@ -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()