-
Notifications
You must be signed in to change notification settings - Fork 727
Closed
Labels
designIssues regarding Terminal.Gui design (bugs, guidelines, debates, etc...)Issues regarding Terminal.Gui design (bugs, guidelines, debates, etc...)
Milestone
Description
Possible dupe of:
I want to refactor StatusBar. It's actually a quite simple control, but was written before...
- View.Text
- View.HotKey with killer ToString support
- Frames (for StatusItem spacing/alignment)
- Consistency in eventing (KeyBindings and no Action).
- KeyBindingScope.Application
It should just be a View that is Width = Fill and Y = AnchorEnd by default.
The new StatusItem:
public class StatusItem : View {
public override Text {
get => $"KeyBindings.FirstOrDefault(b => b.Scope != KeyBindingScope.Focus).GetKeyFromCommands(Commands.Default));
}... plus some stuff to auotmatically enable / disable Border.Thickness = new Thickness (0, 0, 1, 0) for the separator.
StatusBar.Add is an override that sets subview.X appropriately (1st gets X = 0, subsequent get X = Pos.View(prev); last gets Width = Dim.Fill()).
Originally posted by @tig in #3070 (comment)
Metadata
Metadata
Assignees
Labels
designIssues regarding Terminal.Gui design (bugs, guidelines, debates, etc...)Issues regarding Terminal.Gui design (bugs, guidelines, debates, etc...)
Type
Projects
Status
✅ Done