Implement Widget::mouse_interaction for PaneGrid
... and fix rendering of drag interaction in `PaneGrid` by introducing an explicit `with_translation` method to `Renderer` and simplifying the `with_layer` and `Clip` primitive.
This commit is contained in:
parent
41394b4e90
commit
4a11cbd994
11 changed files with 167 additions and 66 deletions
|
|
@ -751,11 +751,9 @@ where
|
|||
};
|
||||
|
||||
if text_width > text_bounds.width {
|
||||
renderer.with_layer(
|
||||
text_bounds,
|
||||
Vector::new(offset as u32, 0),
|
||||
render,
|
||||
);
|
||||
renderer.with_layer(text_bounds, |renderer| {
|
||||
renderer.with_translation(Vector::new(-offset, 0.0), render)
|
||||
});
|
||||
} else {
|
||||
render(renderer);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue