editor: Show tooltips in selectors

This commit is contained in:
Elias Projahn 2025-02-09 08:14:46 +01:00
parent 3adcc0f10e
commit 0fe143a383
8 changed files with 31 additions and 8 deletions

View file

@ -212,6 +212,8 @@ impl MusicusPerformerRoleSelectorPopover {
.build(),
);
row.set_tooltip_text(Some(&role.to_string()));
let role = role.clone();
let obj = self.clone();
row.connect_activated(move |_: &MusicusActivatableRow| {
@ -256,12 +258,14 @@ impl MusicusPerformerRoleSelectorPopover {
for instrument in &instruments {
let row = MusicusActivatableRow::new(
&gtk::Label::builder()
.label(instrument.name.get())
.label(instrument.to_string())
.halign(gtk::Align::Start)
.ellipsize(pango::EllipsizeMode::Middle)
.build(),
);
row.set_tooltip_text(Some(&instrument.to_string()));
let instrument = instrument.clone();
let obj = self.clone();
row.connect_activated(move |_: &MusicusActivatableRow| {