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

Some scenarios with MenuBar or StatusBar needs to fix Window position. #3781

Closed
BDisp opened this issue Oct 8, 2024 · 7 comments
Closed
Assignees
Labels
bug design Issues regarding Terminal.Gui design (bugs, guidelines, debates, etc...) v2 For discussions, issues, etc... relavant for v2

Comments

@BDisp
Copy link
Collaborator

BDisp commented Oct 8, 2024

The solution is define that it's mandatory to setup the views layout at design time. For now a MenuBar and StatusBar has a height of 1, but if it's changed in the future, then the Window must be layout with Y = Pos.Bottom(menuBar), Height = Dim.Fill(Dim.Func (() => statusBar.Frame.Height)). In this case we need to change the current layout in the scenarios.

image

Originally posted by @BDisp in #3766 (comment)

@BDisp BDisp self-assigned this Oct 8, 2024
@BDisp BDisp added bug design Issues regarding Terminal.Gui design (bugs, guidelines, debates, etc...) v2 For discussions, issues, etc... relavant for v2 labels Oct 8, 2024
@tig
Copy link
Collaborator

tig commented Oct 8, 2024

Fixed in #3766

@BDisp
Copy link
Collaborator Author

BDisp commented Oct 8, 2024

Fixed in #3766

All of them?

@BDisp
Copy link
Collaborator Author

BDisp commented Oct 8, 2024

I only opened this issue due to your comment here #3766 (comment).

@tig
Copy link
Collaborator

tig commented Oct 8, 2024

Fixed in #3766

All of them?

Yessir.

@tig
Copy link
Collaborator

tig commented Oct 8, 2024

I only opened this issue due to your comment here #3766 (comment).

I appreciate it!

@BDisp
Copy link
Collaborator Author

BDisp commented Oct 8, 2024

Fixed in #3766

All of them?

Yessir.

You didn't fix in the ASCIICustomButtonTest scenario.
Change this line:

image

to:

_scrollViewTestWindow = new ScrollViewTestWindow { Y = Pos.Bottom (menu) };

Change this two lines:

image

to:

        private FrameView _border = new ();
        private Label _fill = new ();

You also didn't fix the scenarios below.

ClassExplorer
ContextMenus
LineViewExample
Localization
SingleBackgroundWorker (The second MenuBar on StagingUIController class and set Modal = true)

            _top = new()
            {
                Title = "_top", Width = Dim.Fill (), Height = Dim.Fill (),
                Modal = true
            };

WizardAsView

@tig
Copy link
Collaborator

tig commented Oct 9, 2024

You're gonna have to fix SingleBackgroundWorker. I can't figure out how its supposed to work. I've fixed the rest, I think.

@tig tig closed this as completed in a349af0 Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug design Issues regarding Terminal.Gui design (bugs, guidelines, debates, etc...) v2 For discussions, issues, etc... relavant for v2
Projects
None yet
Development

No branches or pull requests

2 participants