Skip to content

Commit e5c5f61

Browse files
committed
Fixed Bars
1 parent 7a15f7b commit e5c5f61

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

UICatalog/Scenarios/Bars.cs

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -467,13 +467,9 @@ private void ConfigureMenu (Bar bar)
467467

468468
var line = new Line ()
469469
{
470-
BorderStyle = LineStyle.Dotted,
471-
Orientation = Orientation.Horizontal,
472-
CanFocus = false,
470+
X = -1,
471+
Width = Dim.Fill ()! + 1
473472
};
474-
// HACK: Bug in Line
475-
line.Orientation = Orientation.Vertical;
476-
line.Orientation = Orientation.Horizontal;
477473

478474
var shortcut4 = new Shortcut
479475
{
@@ -482,6 +478,16 @@ private void ConfigureMenu (Bar bar)
482478
Key = Key.D3.WithAlt,
483479
HighlightStyle = HighlightStyle.Hover
484480
};
481+
482+
shortcut4.CommandView = new CheckBox ()
483+
{
484+
Title = shortcut4.Title,
485+
HighlightStyle = HighlightStyle.None,
486+
CanFocus = false
487+
};
488+
// This ensures the checkbox state toggles when the hotkey of Title is pressed.
489+
shortcut4.Accepting += (sender, args) => args.Cancel = true;
490+
485491
bar.Add (shortcut1, shortcut2, shortcut3, line, shortcut4);
486492
}
487493

0 commit comments

Comments
 (0)