diff options
author | 2021-10-25 16:16:35 +0700 | |
---|---|---|
committer | 2021-10-25 16:35:02 +0700 | |
commit | 4a11cbd99445338619dfaf1f327dbc25b2983cb7 (patch) | |
tree | 254598ff97f17cb33e44bd1402323d3b6892cb6b /graphics/src/layer.rs | |
parent | 41394b4e90a81a43c796c070e706e6aa4d8652bc (diff) | |
download | iced-4a11cbd99445338619dfaf1f327dbc25b2983cb7.tar.gz iced-4a11cbd99445338619dfaf1f327dbc25b2983cb7.tar.bz2 iced-4a11cbd99445338619dfaf1f327dbc25b2983cb7.zip |
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.
Diffstat (limited to 'graphics/src/layer.rs')
-rw-r--r-- | graphics/src/layer.rs | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/graphics/src/layer.rs b/graphics/src/layer.rs index e5cb64c3..7a32c850 100644 --- a/graphics/src/layer.rs +++ b/graphics/src/layer.rs @@ -175,11 +175,7 @@ impl<'a> Layer<'a> { }); } } - Primitive::Clip { - bounds, - offset, - content, - } => { + Primitive::Clip { bounds, content } => { let layer = &mut layers[current_layer]; let translated_bounds = *bounds + translation; @@ -192,8 +188,7 @@ impl<'a> Layer<'a> { Self::process_primitive( layers, - translation - - Vector::new(offset.x as f32, offset.y as f32), + translation, content, layers.len() - 1, ); |