chore: fix virtual offset
This commit is contained in:
parent
00bb0162d1
commit
99bc455118
2 changed files with 28 additions and 7 deletions
|
|
@ -113,7 +113,11 @@ where
|
||||||
self.content.as_widget_mut().update(
|
self.content.as_widget_mut().update(
|
||||||
&mut tree.children[0],
|
&mut tree.children[0],
|
||||||
event,
|
event,
|
||||||
layout.children().next().unwrap(),
|
layout
|
||||||
|
.children()
|
||||||
|
.next()
|
||||||
|
.unwrap()
|
||||||
|
.with_virtual_offset(layout.virtual_offset()),
|
||||||
cursor,
|
cursor,
|
||||||
renderer,
|
renderer,
|
||||||
clipboard,
|
clipboard,
|
||||||
|
|
@ -137,7 +141,11 @@ where
|
||||||
renderer,
|
renderer,
|
||||||
theme,
|
theme,
|
||||||
style,
|
style,
|
||||||
layout.children().next().unwrap(),
|
layout
|
||||||
|
.children()
|
||||||
|
.next()
|
||||||
|
.unwrap()
|
||||||
|
.with_virtual_offset(layout.virtual_offset()),
|
||||||
cursor,
|
cursor,
|
||||||
viewport,
|
viewport,
|
||||||
);
|
);
|
||||||
|
|
@ -153,7 +161,11 @@ where
|
||||||
) -> mouse::Interaction {
|
) -> mouse::Interaction {
|
||||||
self.content.as_widget().mouse_interaction(
|
self.content.as_widget().mouse_interaction(
|
||||||
&tree.children[0],
|
&tree.children[0],
|
||||||
layout.children().next().unwrap(),
|
layout
|
||||||
|
.children()
|
||||||
|
.next()
|
||||||
|
.unwrap()
|
||||||
|
.with_virtual_offset(layout.virtual_offset()),
|
||||||
cursor,
|
cursor,
|
||||||
viewport,
|
viewport,
|
||||||
renderer,
|
renderer,
|
||||||
|
|
@ -169,7 +181,11 @@ where
|
||||||
) {
|
) {
|
||||||
self.content.as_widget_mut().operate(
|
self.content.as_widget_mut().operate(
|
||||||
&mut tree.children[0],
|
&mut tree.children[0],
|
||||||
layout.children().next().unwrap(),
|
layout
|
||||||
|
.children()
|
||||||
|
.next()
|
||||||
|
.unwrap()
|
||||||
|
.with_virtual_offset(layout.virtual_offset()),
|
||||||
renderer,
|
renderer,
|
||||||
operation,
|
operation,
|
||||||
);
|
);
|
||||||
|
|
@ -185,7 +201,11 @@ where
|
||||||
) -> Option<overlay::Element<'a, Message, Theme, Renderer>> {
|
) -> Option<overlay::Element<'a, Message, Theme, Renderer>> {
|
||||||
self.content.as_widget_mut().overlay(
|
self.content.as_widget_mut().overlay(
|
||||||
&mut tree.children[0],
|
&mut tree.children[0],
|
||||||
layout.children().next().unwrap(),
|
layout
|
||||||
|
.children()
|
||||||
|
.next()
|
||||||
|
.unwrap()
|
||||||
|
.with_virtual_offset(layout.virtual_offset()),
|
||||||
renderer,
|
renderer,
|
||||||
viewport,
|
viewport,
|
||||||
translation,
|
translation,
|
||||||
|
|
|
||||||
|
|
@ -963,11 +963,12 @@ where
|
||||||
)),
|
)),
|
||||||
e => e,
|
e => e,
|
||||||
};
|
};
|
||||||
|
|
||||||
self.content.as_widget_mut().update(
|
self.content.as_widget_mut().update(
|
||||||
&mut tree.children[0],
|
&mut tree.children[0],
|
||||||
&c_event,
|
&c_event,
|
||||||
content,
|
content.with_virtual_offset(
|
||||||
|
translation + layout.virtual_offset(),
|
||||||
|
),
|
||||||
cursor,
|
cursor,
|
||||||
renderer,
|
renderer,
|
||||||
clipboard,
|
clipboard,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue