Clip text to viewport bounds instead of layout bounds
This commit is contained in:
parent
99899d49cc
commit
936d480267
23 changed files with 177 additions and 115 deletions
|
|
@ -266,7 +266,7 @@ where
|
|||
style: &renderer::Style,
|
||||
layout: Layout<'_>,
|
||||
cursor: mouse::Cursor,
|
||||
_viewport: &Rectangle,
|
||||
viewport: &Rectangle,
|
||||
) {
|
||||
let is_mouse_over = cursor.is_over(layout.bounds());
|
||||
|
||||
|
|
@ -315,6 +315,7 @@ where
|
|||
},
|
||||
bounds.center(),
|
||||
custom_style.icon_color,
|
||||
*viewport,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -330,6 +331,7 @@ where
|
|||
crate::text::Appearance {
|
||||
color: custom_style.text_color,
|
||||
},
|
||||
viewport,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue