Skip to content

Commit d28af3e

Browse files
committed
Clarify preset apply tooltip binding
1 parent 9ed7a9a commit d28af3e

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/backend/wayland/toolbar/render.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1064,14 +1064,15 @@ pub fn render_side_palette(
10641064
} else {
10651065
format!("Apply preset {} ({})", slot, summary)
10661066
};
1067+
let tooltip = match snapshot.binding_hints.apply_preset(slot) {
1068+
Some(binding) => format!("{label} (key: {binding})"),
1069+
None => label,
1070+
};
10671071
hits.push(HitRegion {
10681072
rect: (slot_x, slot_row_y, slot_size, slot_size),
10691073
event: ToolbarEvent::ApplyPreset(slot),
10701074
kind: HitKind::Click,
1071-
tooltip: Some(format_binding_label(
1072-
&label,
1073-
snapshot.binding_hints.apply_preset(slot),
1074-
)),
1075+
tooltip: Some(tooltip),
10751076
});
10761077

10771078
ctx.set_source_rgba(1.0, 1.0, 1.0, 0.9);

0 commit comments

Comments
 (0)