Merge branch 'v2_develop' into v2_4488-PopoverMenu

This commit is contained in:
Tig
2025-12-16 14:25:16 -07:00
committed by GitHub
12 changed files with 1028 additions and 259 deletions

View File

@@ -1,4 +1,4 @@
#nullable enable
#nullable enable
using System.Text;
@@ -90,29 +90,16 @@ public sealed class WideGlyphs : Scenario
Rune codepoint = _codepoints [r, c];
if (codepoint != default (Rune))
{
view.AddRune (c, r, codepoint);
view.Move (c, r);
Attribute attr = view.GetAttributeForRole (VisualRole.Normal);
view.SetAttribute (attr with { Background = attr.Background + (r * 5) });
view.AddRune (codepoint);
}
}
}
e.DrawContext?.AddDrawnRectangle (view.Viewport);
};
Line verticalLineAtEven = new ()
{
X = 10,
Orientation = Orientation.Vertical,
Length = Dim.Fill ()
};
appWindow.Add (verticalLineAtEven);
Line verticalLineAtOdd = new ()
{
X = 25,
Orientation = Orientation.Vertical,
Length = Dim.Fill ()
};
appWindow.Add (verticalLineAtOdd);
View arrangeableViewAtEven = new ()
{
CanFocus = true,
@@ -124,13 +111,16 @@ public sealed class WideGlyphs : Scenario
//BorderStyle = LineStyle.Dashed
};
arrangeableViewAtEven.SetScheme (new () { Normal = new (Color.Black, Color.Green) });
// Proves it's not LineCanvas related
arrangeableViewAtEven!.Border!.Thickness = new (1);
arrangeableViewAtEven.Border.Add (new View () { Height = Dim.Auto (), Width = Dim.Auto (), Text = "Even" });
appWindow.Add (arrangeableViewAtEven);
View arrangeableViewAtOdd = new ()
Button arrangeableViewAtOdd = new ()
{
Title = $"你 {Glyphs.Apple}",
CanFocus = true,
Arrangement = ViewArrangement.Movable | ViewArrangement.Resizable,
X = 31,
@@ -138,8 +128,12 @@ public sealed class WideGlyphs : Scenario
Width = 15,
Height = 5,
BorderStyle = LineStyle.Dashed,
SchemeName = "error"
};
arrangeableViewAtOdd.Accepting += (sender, args) =>
{
MessageBox.Query ((sender as View)?.App, "Button Pressed", "You Pressed it!");
};
appWindow.Add (arrangeableViewAtOdd);
var superView = new View
@@ -150,8 +144,11 @@ public sealed class WideGlyphs : Scenario
Width = Dim.Auto (),
Height = Dim.Auto (),
BorderStyle = LineStyle.Single,
Arrangement = ViewArrangement.Movable | ViewArrangement.Resizable
Arrangement = ViewArrangement.Movable | ViewArrangement.Resizable,
ShadowStyle = ShadowStyle.Transparent,
};
superView.Margin!.ShadowSize = superView.Margin!.ShadowSize with { Width = 2 };
Rune codepoint = Glyphs.Apple;