only show open button if something can be opened

This commit is contained in:
Michael Meuli 2026-01-16 20:31:44 +01:00 committed by Jacob Kauffmann
parent 3e932877a9
commit e729ebe2b2

View file

@ -2454,9 +2454,11 @@ impl Item {
column = column.push(details);
if let Some(path) = self.path_opt() {
column = column.push(
widget::button::standard(fl!("open")).on_press(Message::Open(Some(path.clone()))),
);
if self.selected {
column = column.push(
widget::button::standard(fl!("open")).on_press(Message::Open(Some(path.clone()))),
);
}
}
if !settings.is_empty() {