-
Notifications
You must be signed in to change notification settings - Fork 685
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
Create a new Bar
view to replace StatusBar
(and eventually MenuBar
)
#3073
Comments
StatusBar
to replace old...Bar
view to replace StatusBar
(and eventually MenuBar
)
The user needs to create a format |
@tig why the |
It's been a while since I worked on this. So I'm not clear what you're talking about. Are you commenting on this PR? |
I know this is not related to the |
I was actually referring to what currently exists in |
@tig I'm trying to set the |
Yeah, I went back and forth on this. I don't think I added a good enough unit test though. So if you want to suggest one that would be great.' Also, note there are some bugs in there still. To see what I mean, open the UI Catalog about box and then drag it around. You'll see it is the wrong size when first created. These are bugs in Dim.Auto (Content) I'm still working through. |
First, please don't use Second, I think you're coming across bugs in It would be amazing if you could narrow down what you're seeing into a new Finally, I'm not sure spending time on the Dyamic StatusBar scenario is a good use of time right now given I plan on rewriting it as part of #3076 |
I don't know why to restrict a modal view defined with
I understand and praise your efforts and will always help in any way I can. I'm not criticizing, for God's sake.
I'll introduce a unit test in a new issue for this.
I was just testing this on a new |
I'm thinking ahead to when we support non-full screen apps. If a Modal has no SuperView, then yes, the size of the console should be used. However, if a Modal HAS a SuperView, it should be constrained by it. I know we don't have a way of making Modals have SuperViews today. |
Dude, I was just pointing out that there are bugs in there and you're probably encountering them. |
Cool! |
I've also been thinking a lot about how to handle non-full screen apps and one of the solutions is to restrict the redrawing to just the Modal area and leave the rest of the console area intact. The problem is resizing the console will affect existing content that does not belong to the Modal. But it could be a start.
It is the normal procedure if the Modal is not of fixed size.
I don't understand why a Modal has to have a SuperView. For me, a Modal is a view that overlays all other views, which cannot be accessed while the Modal is open. If a Modal opens another Modal, this one will override all the others, including the other Modals.
Because it shouldn't really be necessary, in my opinion. |
But have you tried doing that, @BDisp ? The results can be.... Interesting.... Trying to draw to just part of the screen buffer, especially if we are using ANSI esc sequences, can result in all sorts of strange output, inconsistently, even within the same terminal emulator. It's a big can of worms to open. |
As an example, I was using the serial console redirection on a high end server system, a few days ago. It claims to be xterm-256color compatible, and I was accessing it via Windows Terminal Preview as the host, with PowerShell 7.5 preview 3 as the shell, and then ssh to the server's management interface. The first screen draw was fractured and unusable. Upon resizing the window, some of that got better. But most stuff didn't get any better until the content at each specific coordinate was updated explicitly. They, like that idea, were trying to only update the necessary parts of the screen buffer, since it's designed to work well even over a slow dial-up modem interface. But all the variables in between, plus I'm sure subtle bugs in their code, all conspired together to make it an unpleasant experience. We can likely do much better, but probably still should do things like explicitly blank the rest of the screen every few frames or something, to mitigate that kind of problem. |
I haven't tried it yet because I don't think I'll be able to deal with non-Terminal.Gui content when the console is resized. First, how to obtain this content. Second, if you can get it, how to write to the console with the same type of letters, colors, etc.. That's why I haven't tried it yet, but one day I will, but I already know that the original content will be all messed up when resizing the console. |
Yep. It's a whole mine field. |
Fixes #3073. Adds `Shortcut`, `Bar`, and replaces `StatusBar`
Possible dupe of:
Menu
- Base onBar
and address litany of issues #2975I want to refactor StatusBar. It's actually a quite simple control, but was written before...
It should just be a View that is Width = Fill and Y = AnchorEnd by default.
The new StatusItem:
... plus some stuff to auotmatically enable / disable
Border.Thickness = new Thickness (0, 0, 1, 0)
for the separator.StatusBar.Add
is an override that setssubview.X
appropriately (1st getsX = 0
, subsequent getX = Pos.View(prev)
; last getsWidth = Dim.Fill()
).Originally posted by @tig in #3070 (comment)
The text was updated successfully, but these errors were encountered: