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,10 +2454,12 @@ impl Item {
column = column.push(details); column = column.push(details);
if let Some(path) = self.path_opt() { if let Some(path) = self.path_opt() {
if self.selected {
column = column.push( column = column.push(
widget::button::standard(fl!("open")).on_press(Message::Open(Some(path.clone()))), widget::button::standard(fl!("open")).on_press(Message::Open(Some(path.clone()))),
); );
} }
}
if !settings.is_empty() { if !settings.is_empty() {
let mut section = widget::settings::section(); let mut section = widget::settings::section();