Skip to content

Commit

Permalink
tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
tig committed Dec 18, 2024
2 parents f24c7bd + 557e637 commit e783a22
Showing 1 changed file with 41 additions and 25 deletions.
66 changes: 41 additions & 25 deletions UICatalog/Scenarios/Arrangement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,28 @@ public override void Main ()
};
testFrame.Add (datePicker);

testFrame.Add (new TransparentView ());
TransparentView transparentView = new ()
{
Id = "transparentView",
X = 5,
Y = 11,
Width = 35,
Height = 15
};

testFrame.Add (new TransparentView () { Title = "Transparent #2"});
transparentView.Add (
new TransparentView ()
{
Title = "Transparent SubView",
Text = "Transparent SubView",
Id = "transparentSubView",
X = 10,
Y = 10,
Width = 10,
Height = 5

});
testFrame.Add (transparentView);

adornmentsEditor.AutoSelectSuperView = testFrame;
arrangementEditor.AutoSelectSuperView = testFrame;
Expand Down Expand Up @@ -302,30 +321,27 @@ public override List<Key> GetDemoKeyStrokes ()

return keys;
}
}

public class TransparentView : FrameView
public class TransparentView : FrameView
{
public TransparentView ()
{
public TransparentView()
{
Title = "Transparent";
Text = "Text";
X = 5;
Y = 10;
Width = 30;
Height = 10;
Arrangement = ViewArrangement.Overlapped | ViewArrangement.Resizable | ViewArrangement.Movable;
ViewportSettings |= Terminal.Gui.ViewportSettings.Transparent;
BorderStyle = LineStyle.Double;
CanFocus = true;

base.Add (
new Button ()
{
Title = "_Hi",
X = Pos.Center (),
Y = Pos.Center (),
ShadowStyle = ShadowStyle.None
});
}
Title = "Transparent";
base.Text = "Text";
Arrangement = ViewArrangement.Overlapped | ViewArrangement.Resizable | ViewArrangement.Movable;
ViewportSettings |= Terminal.Gui.ViewportSettings.Transparent;
base.Add (
new Button ()
{
Title = "_Hi",
X = Pos.Center (),
Y = Pos.Center (),
ShadowStyle = ShadowStyle.None,
ColorScheme = Colors.ColorSchemes ["Toplevel"],
});
}

/// <inheritdoc />
protected override bool OnMouseEvent (MouseEventArgs mouseEvent) { return false; }
}

0 comments on commit e783a22

Please sign in to comment.