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

A full-screen Modal view should not be movable/sizable #3344

Closed
tig opened this issue Mar 21, 2024 · 2 comments
Closed

A full-screen Modal view should not be movable/sizable #3344

tig opened this issue Mar 21, 2024 · 2 comments

Comments

@tig
Copy link
Collaborator

tig commented Mar 21, 2024

As noted by @BDisp in #3342 (comment)_

Toplevel created by the Application.Init shouldn't be moveable, otherwise it will behave badly because it represent all the available space on a terminal.

It should also not be sizable (not currently supported, but will be when #2537 is addressed).

This is not just about Toplevels created by Init. In the Adornments scenario, I do not use Application.Top but run the Scenario using Application.Run (editor). The editor Toplevel is meant to be full screen... and it behaves badly as @BDisp noted.

To fix this, I propose modifying the View move/drag code in Adornment (which will be moved to Border asap) to check for Modal == true && IsFullScreen and ignoring Arrangement if so.

We'll have to figure out what IsFullScreen means. It could be something like if (X == 0 && Y == 0 && Width == Fill && Height == Fill)

@BDisp
Copy link
Collaborator

BDisp commented Mar 21, 2024

We'll have to figure out what IsFullScreen means. It could be something like if (X == 0 && Y == 0 && Width == Fill && Height == Fill)

Well, that depends if the Parent has or not superview. If it doesn't have then it should be if (X == 0 && Y == 0 && Width == Driver.Cols && Height == Driver.Rows)

@tig
Copy link
Collaborator Author

tig commented Apr 3, 2024

Wasn't what we thought it was. I had a bug in OnResizeNeeded. PR incoming.

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

No branches or pull requests

2 participants