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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user