Fix text::State downcast in some widgets

This commit is contained in:
Héctor Ramón Jiménez 2024-07-19 00:59:54 +02:00
parent 1d1a5f1a28
commit c851e67734
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
4 changed files with 10 additions and 4 deletions

View file

@ -358,12 +358,14 @@ where
{
let label_layout = children.next().unwrap();
let state: &widget::text::State<Renderer::Paragraph> =
tree.state.downcast_ref();
crate::text::draw(
renderer,
defaults,
label_layout,
tree.state.downcast_ref(),
state.0.raw(),
crate::text::Style {
color: style.text_color,
},