Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent size/position handling for overlays #707

Open
toaster opened this issue Feb 24, 2020 · 2 comments
Open

Inconsistent size/position handling for overlays #707

toaster opened this issue Feb 24, 2020 · 2 comments

Comments

@toaster
Copy link
Member

toaster commented Feb 24, 2020

The size and position handling of overlays is inconsistent and breaks things or causes dirty hacks.
An overlay is supposed to always have its canvas' size. That's why a canvas resizes its overlay to its size if it gets resized. Thus giving an overlay a different size doesn't make sense because it will be resized on a window resize.
The PopUp is designed to be an overlay which behaves like normal content (settable size and position) but under the hood it is an overlay and tries to satisfy the requirement of pos(0,0) and canvas size.
That's why PopUp.Size() doesn't report what PopUp.Resize() sets. But the latter must not be used with the canvas size because it affects the PopUp's content.
The same is true for the PopUp's position.
Because of this there is PopUp specific code in the canvas which is obviously bad.

This whole issue also is the root cause of #706.

I propose to wrap overlay objects into an special (probably internal) structure. This should handle the size/position correctly while the size/position handling of the overlay's content works normally.
The details still need to be carved out but this would remove the cause of #706 and the special code in the canvas. It also will make the fix of #706 obsolete if one has been put in place.

@andydotxyz
Copy link
Member

is this resolved now @toaster ?

@toaster
Copy link
Member Author

toaster commented Nov 30, 2020

No, no work has been done on this.

@stuartmscott stuartmscott added this to the Aberlour (next release) milestone Feb 13, 2021
@Jacalz Jacalz changed the title inconsistent size/position handling for overlays Inconsistent size/position handling for overlays Sep 30, 2022
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

No branches or pull requests

3 participants