Skip to content

Commit

Permalink
Fix Tooltip widget state management
Browse files Browse the repository at this point in the history
  • Loading branch information
hecrj committed Sep 10, 2023
1 parent df72fd1 commit b329950
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions widget/src/tooltip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,9 @@ where
renderer: &Renderer,
limits: &layout::Limits,
) -> layout::Node {
self.content.as_widget().layout(tree, renderer, limits)
self.content
.as_widget()
.layout(&mut tree.children[0], renderer, limits)
}

fn on_event(
Expand Down Expand Up @@ -434,7 +436,7 @@ where

Widget::<(), Renderer>::draw(
self.tooltip,
&widget::Tree::empty(),
&self.state,

Check failure on line 439 in widget/src/tooltip.rs

View workflow job for this annotation

GitHub Actions / all

this expression creates a reference which is immediately dereferenced by the compiler
renderer,
theme,
&defaults,
Expand Down

0 comments on commit b329950

Please sign in to comment.