Skip to content

Conversation

@almarklein
Copy link
Member

In #141 I made it such that when canvas.set_logical_size() is called (either by the user, or as part of initializing the widget), the logical size of the widget is immediately set. Since the widget may take a while to actually resize (think of widget embedded in a GUI, or a jupyter canvas), there is temporarily a very weird pixel ratio.

The idea for this change was that code that instantiate a widget and then directly try to use its logical size, have a (likely) correct value to work with already.

But I'm not pretty sure this was a mistake; the temporary phase were the logical size and physical size are "out of sync" is short, but it breaks assumptions, and makes it hard to explain what "logical size" really means.

@almarklein
Copy link
Member Author

Checked that this (probably) does not break fastplotlib: fastplotlib/fastplotlib#948

@almarklein almarklein marked this pull request as ready for review November 19, 2025 15:29
@almarklein almarklein merged commit 583e7c4 into main Nov 19, 2025
13 checks passed
@almarklein almarklein deleted the lazy-logical-size branch November 19, 2025 15:29
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