Tooltip for long filenames, fixes #169
This commit is contained in:
parent
ad8be058ef
commit
705c780721
1 changed files with 17 additions and 11 deletions
28
src/tab.rs
28
src/tab.rs
|
|
@ -3509,23 +3509,29 @@ impl Tab {
|
||||||
)));
|
)));
|
||||||
|
|
||||||
//TODO: one focus group per grid item (needs custom widget)
|
//TODO: one focus group per grid item (needs custom widget)
|
||||||
let buttons = vec![
|
let buttons: Vec<Element<Message>> = vec![
|
||||||
widget::button::custom(
|
widget::button::custom(
|
||||||
widget::icon::icon(item.icon_handle_grid.clone())
|
widget::icon::icon(item.icon_handle_grid.clone())
|
||||||
.content_fit(ContentFit::Contain)
|
.content_fit(ContentFit::Contain)
|
||||||
.size(icon_sizes.grid()),
|
.size(icon_sizes.grid()),
|
||||||
)
|
)
|
||||||
.padding(space_xxxs)
|
.padding(space_xxxs)
|
||||||
.style(button_style(item.selected, false, false, false)),
|
.style(button_style(item.selected, false, false, false))
|
||||||
widget::button::custom(widget::text::body(&item.display_name))
|
.into(),
|
||||||
.id(item.button_id.clone())
|
widget::tooltip(
|
||||||
.padding([0, space_xxxs])
|
widget::button::custom(widget::text::body(&item.display_name))
|
||||||
.style(button_style(
|
.id(item.button_id.clone())
|
||||||
item.selected,
|
.padding([0, space_xxxs])
|
||||||
true,
|
.style(button_style(
|
||||||
true,
|
item.selected,
|
||||||
matches!(self.mode, Mode::Desktop),
|
true,
|
||||||
)),
|
true,
|
||||||
|
matches!(self.mode, Mode::Desktop),
|
||||||
|
)),
|
||||||
|
&item.name,
|
||||||
|
widget::tooltip::Position::Bottom,
|
||||||
|
)
|
||||||
|
.into(),
|
||||||
];
|
];
|
||||||
|
|
||||||
let mut column = widget::column::with_capacity(buttons.len())
|
let mut column = widget::column::with_capacity(buttons.len())
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue