Temp fix for ProgressStyles scenario

This commit is contained in:
Tig
2024-04-08 12:17:37 -04:00
parent bd0f89f8b1
commit 102269ec2a

View File

@@ -64,19 +64,25 @@ public class ProgressBarStyles : Scenario
{
var colorPicker = new ColorPicker { Title = text, SelectedColor = colorName };
var dialog = new Dialog { Title = text };
var dialog = new Dialog { AutoSize = false, Title = text };
dialog.LayoutComplete += (sender, args) =>
dialog.Initialized += (sender, args) =>
{
// TODO: Replace with Dim.Auto
dialog.X = pbList.Frame.X;
dialog.Y = pbList.Frame.Height;
dialog.Bounds = new Rectangle (0, 0, colorPicker.Frame.Width, colorPicker.Frame.Height);
Top.LayoutSubviews ();
};
dialog.LayoutComplete += (sender, args) =>
{
dialog.Bounds = Rectangle.Empty with
{
Width = colorPicker.Frame.Width,
Height = colorPicker.Frame.Height
};
Application.Top.LayoutSubviews();
};
dialog.Add (colorPicker);
colorPicker.ColorChanged += (s, e) => { dialog.RequestStop (); };
Application.Run (dialog);