Skip to content

Commit

Permalink
Slider showcase and bugfixes in designer
Browse files Browse the repository at this point in the history
  • Loading branch information
tznind committed Sep 1, 2024
1 parent 7f18bd3 commit de1453d
Show file tree
Hide file tree
Showing 4 changed files with 192 additions and 21 deletions.
144 changes: 144 additions & 0 deletions Showcase/Slider.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions Showcase/Slider.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@

//------------------------------------------------------------------------------

// <auto-generated>
// This code was generated by:
// TerminalGuiDesigner v2.0.0.0
// You can make changes to this file and they will not be overwritten when saving.
// </auto-generated>
// -----------------------------------------------------------------------------
namespace Showcase {
using Terminal.Gui;


public partial class Slider {

public Slider() {
InitializeComponent();
}
}
}
7 changes: 7 additions & 0 deletions src/Design.cs
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,13 @@ public Design CreateSubControlDesign(string name, View subView)
tf.KeyDown += SuppressNativeKeyboardEvents;
}

if (subView.GetType().IsGenericType(typeof(Slider<>)))
{
// TODO: Does not seem to work
subView.MouseEvent += (s, e) => SuppressNativeClickEvents(s, e,true);
subView.MouseClick += (s, e) => SuppressNativeClickEvents(s,e, true);
}

if (subView is TreeView tree)
{
tree.AddObject(new TreeNode("Example Branch 1")
Expand Down
42 changes: 21 additions & 21 deletions src/UI/Windows/SliderOptionEditor.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit de1453d

Please sign in to comment.