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
|
|
@ -429,7 +429,7 @@ where
|
|||
style: &renderer::Style,
|
||||
layout: Layout<'_>,
|
||||
cursor: mouse::Cursor,
|
||||
_viewport: &Rectangle,
|
||||
viewport: &Rectangle,
|
||||
) {
|
||||
let bounds = layout.bounds();
|
||||
|
||||
|
|
@ -470,6 +470,7 @@ where
|
|||
bounds.position()
|
||||
+ Vector::new(self.padding.left, self.padding.top),
|
||||
style.text_color,
|
||||
*viewport,
|
||||
);
|
||||
|
||||
let translation = Vector::new(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue