Skip to content

flickable consider virtual keyboard#11570

Draft
Murmele wants to merge 9 commits intoslint-ui:masterfrom
Murmele:mm/flickable-virtual-keyboard
Draft

flickable consider virtual keyboard#11570
Murmele wants to merge 9 commits intoslint-ui:masterfrom
Murmele:mm/flickable-virtual-keyboard

Conversation

@Murmele
Copy link
Copy Markdown
Contributor

@Murmele Murmele commented Apr 29, 2026

Follow up of #11519

map the geometry origin to window instead of keyboard to item coordinates

Reason: Because geometry does not consider the flick position of the parent

tilladam and others added 6 commits April 27, 2026 22:10
The previous implementation accumulated geometry recursively by adding
parent origins, ignoring scale and rotate transforms entirely. Items
inside a scaled or rotated Transform element would report wrong
window-space geometry and clip rects, causing incorrect hit testing
and element inspection results.

Extract a shared `local_to_window_transform(stop_condition)` helper that
walks the ancestor chain composing each ancestor's `children_transform`
(scale/rotate, via the same logic as the partial renderer's
`current_transform()`) followed by its translation into a single
`ItemTransform`. Use `outer_transformed_rect` to map the local rect to
window space, correctly covering rotation as well as scale.

Simplify `map_to_item_tree_impl` to use the same helper, removing
the duplicate ancestor walk.
Combine nested `if` statements using a let-chain.
Reason: otherwise in the flickable always the mapping to the item coordinate system is done which is not neccessary
@Murmele Murmele changed the title Mm/flickable virtual keyboard flickable consider virtual keyboard Apr 29, 2026
…ates

Reason: Because geometry does not consider the flick position of the parent
@Murmele Murmele force-pushed the mm/flickable-virtual-keyboard branch from d7f5736 to 39cda56 Compare April 29, 2026 09:41
!(delta.x == 0 as Coord && flick.viewport_height() <= geo.height_length())
&& !(delta.y == 0 as Coord && flick.viewport_width() <= geo.width_length())

(delta.y != 0 as Coord && flick.viewport_height() > geo.height_length())
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LeonMatthes do we need to have it orthogonal? Otherwise the expression can be simplified a bit :)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably not as long as a direction that can be scrolled is part of the event, even if it's diagonal, then we should probably accept it. How would you simplify this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like it is here already :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants