mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-26 15:57:56 +01:00
Also fixed the position and unicode on StatusBar.
This commit is contained in:
@@ -286,6 +286,7 @@ namespace Terminal.Gui {
|
||||
|
||||
internal void PositionToplevels ()
|
||||
{
|
||||
PositionToplevel (this);
|
||||
foreach (var top in Subviews) {
|
||||
if (top is Toplevel) {
|
||||
PositionToplevel ((Toplevel)top);
|
||||
|
||||
@@ -88,7 +88,7 @@ namespace Terminal.Gui {
|
||||
CanFocus = false;
|
||||
ColorScheme = Colors.Menu;
|
||||
X = 0;
|
||||
Y = Driver.Rows - 1;
|
||||
Y = SuperView != null ? SuperView.Frame.Height - 1 : Pos.AnchorEnd (1);
|
||||
Width = Dim.Fill ();
|
||||
Height = 1;
|
||||
|
||||
@@ -100,8 +100,8 @@ namespace Terminal.Gui {
|
||||
return delegate {
|
||||
X = 0;
|
||||
Height = 1;
|
||||
if (SuperView == null || SuperView == Application.Top) {
|
||||
Y = Driver.Rows - 1;
|
||||
if (SuperView == null || SuperView is Toplevel) {
|
||||
Y = SuperView.Frame.Height - 1;
|
||||
} else {
|
||||
//Y = Pos.Bottom (SuperView);
|
||||
}
|
||||
@@ -125,7 +125,7 @@ namespace Terminal.Gui {
|
||||
//}
|
||||
|
||||
Move (0, 0);
|
||||
Driver.SetAttribute (ColorScheme.Normal);
|
||||
Driver.SetAttribute (Colors.Menu.Normal);
|
||||
for (int i = 0; i < Frame.Width; i++)
|
||||
Driver.AddRune (' ');
|
||||
|
||||
@@ -134,7 +134,7 @@ namespace Terminal.Gui {
|
||||
Driver.SetAttribute (scheme);
|
||||
for (int i = 0; i < Items.Length; i++) {
|
||||
var title = Items [i].Title;
|
||||
for (int n = 0; n < title.Length; n++) {
|
||||
for (int n = 0; n < title.RuneCount; n++) {
|
||||
if (title [n] == '~') {
|
||||
scheme = ToggleScheme (scheme);
|
||||
continue;
|
||||
|
||||
@@ -36,6 +36,13 @@ namespace UICatalog {
|
||||
});
|
||||
Top.Add (menu);
|
||||
|
||||
var statusBar = new StatusBar (new StatusItem [] {
|
||||
new StatusItem (Key.ControlQ, "~^Q~ Выход", () => Application.RequestStop()),
|
||||
new StatusItem (Key.Unknown, "~F2~ Создать", null),
|
||||
new StatusItem(Key.Unknown, "~F3~ Со_хранить", null),
|
||||
});
|
||||
Top.Add (statusBar);
|
||||
|
||||
var label = new Label ("Label:") { X = 0, Y = 1 };
|
||||
Win.Add (label);
|
||||
var testlabel = new Label (gitString) { X = 20, Y = Pos.Y (label), Width = Dim.Percent (50), };
|
||||
|
||||
Reference in New Issue
Block a user