-
Notifications
You must be signed in to change notification settings - Fork 696
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
Fixes #2558. MenuBar positions wrong in some situations. #2561
Conversation
* Add many styles to SpinnerView * Add SpinnerStyles as a nested class * Allow zero as valid spinner delay value * Change from BorderStyle to LineStyle * Rename SpinDelayInMilliseconds to just SpinDelay --------- Co-authored-by: Tig <[email protected]>
… Top. (3)If it's an OverlappedTop.
@tig I'm tying to re-enabling some unit tests that are commented. One is the
As you can see the height of the
|
@tig we can use the internal override int Anchor (int width)
{
return (int)Math.Ceiling (width * factor);
} See the differences for height of 7:
|
I don't have an issue with this; lots of unit tests will break because we way over-use Dialog for tests that have nothing to do with Dialog, but that's fixable.
This makes sense to me, but again, it'll probably break a lot of unit tests that will need to be fixed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this fix takes Menubar
in the wrong direction: It makes it an even more "special" view. IMO, MenuBar
(and StatusBar
) has too many special cases baked into Application
and Toplevel
that should all be removed. It should be possible to use Menubar
in any View and it should be possible for devs to build other Views that can be used instead of Menubar
(or StatusBar
).
@@ -368,6 +368,72 @@ public static Toplevel Create () | |||
/// </summary> | |||
public bool IsLoaded { get; private set; } | |||
|
|||
/// <inheritdoc/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oooh. Making Height
/Width
virtual is a HUGE change.
Is this absolutely necessary to fix this Issue?
Subclasses of View
that override these need to be coded very carefully. I fear this could be a real bugfarm in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This also will make it harder for us to get rid of Toplevel
(#2502), and allow any view to act in an overlapping manner.
Fixes #2558 -
Application.Top
added by theApplication.Init
must always be added to the toplevels stack and initialized. If a toplevel is aIsOverlappedContainer
then the Application.Top must be set to theOverlappedTop
.Pull Request checklist:
CTRL-K-D
to automatically reformat your files before committing.dotnet test
before commit///
style comments)