-
Notifications
You must be signed in to change notification settings - Fork 698
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
Significant MessageBox and Dialog Improvements #590
Conversation
This has to go in as part of my other big PR. @migueldeicaza : Please comment. |
I am in awe at this work Charlie - thank you so much for this contribution. I looked at the samples, and it looks like the only breaking change was the incoming parameters for the message box, we could add an API that ignores those parameters? Did I miss something else? I think this can go in, given that you have a mondo pull request with too many good enhancements, and we can later add a compatbility layer if someone complains. |
This PR includes: #586 - Fixed Clipping #587 - LayoutComplete #591 - Sys Console Scenario #590 - Significantly improves MessageBox, Dialog, Frame drawning and more See the PRs above for all the details. Here are the issues this closes: Closes #299 - MessageBox now auto sizes Closes #557 - MessageBoxes on small screens Closes #432 - MessageBox does not deal with long text; width/height params are goofy Closes #521 - MessageBox should take ustrings (BREAKING CHANGE) Closes #35 - Dialog should have 1 char padding around edges Closes #570 - Dialog should use computed layout for buttons Closes #470 - UI Catalog: Add Dialogs Scenario Closes #569 - LayoutComplete event Plus probably more.
Miguel, I'm afraid we are going to need to do a 'breaking changes' release prior to 1.0 if we really want this project to "sing" long-term. There are enough deep bugs due to code churn/atrophy and inconsistencies (such as IMO, we should do this ONCE. I think the build we are converging on (which I am calling 0.90) should be that ONCE. The latest release notes show the breaking changes I've already identified (there may be more, but I've not done any testing to see). |
That said, I'll ensure the old constructors still work on this one. |
Now that Miguel's approved, I'm closing this PR as it will be incorporated in mondo #600 |
This PR requires #586
It includes many fixes, mostly focused on improving the look, feel, and usability of
Dialog
andMessageBox
The following bugs should be closed by this PR:
In addition we get these new features:
MessageBox.Query
called withwidth
andheight
== 0 get auto-size behavior. A new constructor is added making this easy to use.MessageBox
es are now supported. Just use\n
to add lines. The height of the MessageBox will adjust automatically.MessageBoxes
Scenario in UI Catalog provides a full demo/test-case.Dialog
called withwidth
andheight
== 0 are sized to 85% container. A new constructor is added making this easy to use.Buttons
are now dynamically laid out using Computed layout.Dialogs
Scenario has been added to UI Catalog making it easy to test the API.Button
now supports BOTH specifying a hotkey with '' and the old behavior of using the first uppercase char (if '' is not found).Dialog
orMessageBox
now use the simplified API.Terminal.Gui.dll
now has version metadata and UI Catalog's about box displays it as a test case.View
,Window
,FrameView
, andDialog
have been upgraded to use the newConsoleDriver.DrawFrameWindow
API directly.