feat: Tooltips and Better Surface Management
This commit is contained in:
parent
c7edd37b03
commit
337b80d4ca
90 changed files with 3651 additions and 977 deletions
|
|
@ -180,9 +180,7 @@ impl<'a, Message: 'a> Overlay<'a, Message> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a, Message> iced_core::Overlay<Message, crate::Theme, crate::Renderer>
|
||||
for Overlay<'a, Message>
|
||||
{
|
||||
impl<Message> iced_core::Overlay<Message, crate::Theme, crate::Renderer> for Overlay<'_, Message> {
|
||||
fn layout(&mut self, renderer: &crate::Renderer, bounds: Size) -> layout::Node {
|
||||
let position = self.position;
|
||||
let space_below = bounds.height - (position.y + self.target_height);
|
||||
|
|
@ -279,8 +277,8 @@ struct InnerList<'a, S, Item, Message> {
|
|||
text_line_height: text::LineHeight,
|
||||
}
|
||||
|
||||
impl<'a, S, Item, Message> Widget<Message, crate::Theme, crate::Renderer>
|
||||
for InnerList<'a, S, Item, Message>
|
||||
impl<S, Item, Message> Widget<Message, crate::Theme, crate::Renderer>
|
||||
for InnerList<'_, S, Item, Message>
|
||||
where
|
||||
S: AsRef<str>,
|
||||
Item: Clone + PartialEq,
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@ impl<'a, S: AsRef<str>, Message: 'a, Item: Clone + PartialEq + 'static>
|
|||
cursor: mouse::Cursor,
|
||||
viewport: &Rectangle,
|
||||
) {
|
||||
let font = self.font.unwrap_or_else(|| crate::font::default());
|
||||
let font = self.font.unwrap_or_else(crate::font::default);
|
||||
|
||||
draw(
|
||||
renderer,
|
||||
|
|
@ -278,7 +278,7 @@ pub fn layout(
|
|||
bounds: Size::new(f32::MAX, f32::MAX),
|
||||
size: iced::Pixels(text_size),
|
||||
line_height: text_line_height,
|
||||
font: font.unwrap_or_else(|| crate::font::default()),
|
||||
font: font.unwrap_or_else(crate::font::default),
|
||||
horizontal_alignment: alignment::Horizontal::Left,
|
||||
vertical_alignment: alignment::Vertical::Top,
|
||||
shaping: text::Shaping::Advanced,
|
||||
|
|
@ -422,7 +422,7 @@ pub fn overlay<'a, S: AsRef<str>, Message: 'a, Item: Clone + PartialEq + 'static
|
|||
bounds: Size::new(f32::MAX, f32::MAX),
|
||||
size: iced::Pixels(text_size),
|
||||
line_height,
|
||||
font: font.unwrap_or_else(|| crate::font::default()),
|
||||
font: font.unwrap_or_else(crate::font::default),
|
||||
horizontal_alignment: alignment::Horizontal::Left,
|
||||
vertical_alignment: alignment::Vertical::Top,
|
||||
shaping: text::Shaping::Advanced,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue