feat: Tooltips and Better Surface Management

This commit is contained in:
Ashley Wulber 2025-03-14 11:56:21 -04:00 committed by GitHub
parent c7edd37b03
commit 337b80d4ca
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
90 changed files with 3651 additions and 977 deletions

View file

@ -30,8 +30,8 @@ where
SegmentedButton::new(model)
}
impl<'a, SelectionMode, Message> SegmentedVariant
for SegmentedButton<'a, Horizontal, SelectionMode, Message>
impl<SelectionMode, Message> SegmentedVariant
for SegmentedButton<'_, Horizontal, SelectionMode, Message>
where
Model<SelectionMode>: Selectable,
SelectionMode: Default,

View file

@ -15,7 +15,7 @@ pub struct EntityMut<'a, SelectionMode: Default> {
pub(super) model: &'a mut Model<SelectionMode>,
}
impl<'a, SelectionMode: Default> EntityMut<'a, SelectionMode>
impl<SelectionMode: Default> EntityMut<'_, SelectionMode>
where
Model<SelectionMode>: Selectable,
{

View file

@ -30,8 +30,8 @@ where
SegmentedButton::new(model)
}
impl<'a, SelectionMode, Message> SegmentedVariant
for SegmentedButton<'a, Vertical, SelectionMode, Message>
impl<SelectionMode, Message> SegmentedVariant
for SegmentedButton<'_, Vertical, SelectionMode, Message>
where
Model<SelectionMode>: Selectable,
SelectionMode: Default,

View file

@ -547,8 +547,8 @@ where
}
}
impl<'a, Variant, SelectionMode, Message> Widget<Message, crate::Theme, Renderer>
for SegmentedButton<'a, Variant, SelectionMode, Message>
impl<Variant, SelectionMode, Message> Widget<Message, crate::Theme, Renderer>
for SegmentedButton<'_, Variant, SelectionMode, Message>
where
Self: SegmentedVariant,
Model<SelectionMode>: Selectable,
@ -562,7 +562,7 @@ where
if let Some(ref context_menu) = self.context_menu {
let mut tree = Tree::empty();
tree.state = tree::State::new(MenuBarState::default());
tree.children = menu_roots_children(&context_menu);
tree.children = menu_roots_children(context_menu);
children.push(tree);
}
@ -719,7 +719,7 @@ where
let on_dnd_enter =
self.on_dnd_enter
.as_ref()
.zip(entity.clone())
.zip(entity)
.map(|(on_enter, entity)| {
move |_, _, mime_types| on_enter(entity, mime_types)
});