Skip to content

Fix missing scaling for plugin view drag & mouse events #17

Closed
emuell wants to merge 1 commit into
ilmai:mainfrom
emuell:fix/plugin-view-event-scaling
Closed

Fix missing scaling for plugin view drag & mouse events #17
emuell wants to merge 1 commit into
ilmai:mainfrom
emuell:fix/plugin-view-event-scaling

Conversation

@emuell

@emuell emuell commented May 27, 2026

Copy link
Copy Markdown
Contributor

Events sent to PluginView impls, should send positions as logical view positions, applying OS window scale and custom canvas scales, just like events sent to slint.

The MouseXXX events are unlikely to be used in plugin_view, but it makes sense to convert them too, for consistency. I needed this for the drag events only.

The new with_mapped_position is mildly ugly. :) Let me know if you prefer something else here.

@ilmai

ilmai commented May 28, 2026

Copy link
Copy Markdown
Owner

Hey, this feels like the wrong place to do this. I added a new branch to pre-scale mouse event coordinates at plugin-canvas level and removed the scaling code from plugin-canvas-slint: https://github.com/ilmai/plugin-things/tree/mouse-event-scaling

I implemented it for Mac now and will add Linux and Windows implementations later today.

@ilmai ilmai closed this May 28, 2026
@emuell

emuell commented May 28, 2026

Copy link
Copy Markdown
Contributor Author

Yep, that's definitely cleaner.

@emuell emuell deleted the fix/plugin-view-event-scaling branch May 28, 2026 07:40
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.

2 participants