Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add separate button for advanced binding #633

Merged

Conversation

AbstractQbit
Copy link
Contributor

image

@InfinityGhost InfinityGhost added enhancement New feature or request gui Affects driver GUI labels Jan 8, 2021
@InfinityGhost InfinityGhost added this to the v0.5.0 milestone Jan 12, 2021
@InfinityGhost
Copy link
Member

InfinityGhost commented Jan 14, 2021

Sizing on GTK isn't enough now, suggesting this change.

diff --git a/OpenTabletDriver.UX/Controls/BindingEditor.cs b/OpenTabletDriver.UX/Controls/BindingEditor.cs
index c6f605e..0b8dfb7 100644
--- a/OpenTabletDriver.UX/Controls/BindingEditor.cs
+++ b/OpenTabletDriver.UX/Controls/BindingEditor.cs
@@ -28,7 +28,8 @@ namespace OpenTabletDriver.UX.Controls
 
             var tipButton = new BindingDisplay(App.Settings?.TipButton)
             {
-                Width = 250
+                MinimumSize = new Size(300, -1)
             };
             tipButton.BindingUpdated += (sender, binding) => App.Settings.TipButton = binding;
 
@@ -54,7 +55,8 @@ namespace OpenTabletDriver.UX.Controls
             {
                 var penBinding = new BindingDisplay(App.Settings?.PenButtons[i])
                 {
-                    Width = 250,
+                    MinimumSize = new Size(300, -1),
                     Tag = i
                 };
                 penBinding.BindingUpdated += (sender, binding) =>
@@ -85,7 +87,8 @@ namespace OpenTabletDriver.UX.Controls
             {
                 var auxBinding = new BindingDisplay(App.Settings?.AuxButtons[i])
                 {
-                    Width = 250,
+                    MinimumSize = new Size(300, -1),
                     Tag = i
                 };
                 auxBinding.BindingUpdated += (sender, Binding) =>

Co-Authored-By: InfinityGhost <39218853+InfinityGhost@users.noreply.github.com>
@AbstractQbit
Copy link
Contributor Author

Set y to 0 instead of -1 because it was crashing on Windows with System.InvalidOperationException: Layout measurement override of element 'Eto.Wpf.Forms.EtoBorder' should not return NaN values as its DesiredSize. exception.

@InfinityGhost
Copy link
Member

InfinityGhost commented Jan 15, 2021

Waiting on #650 and we'll resolve conflicts here if they appear. We'll deal with that later, in v0.5.x

@InfinityGhost InfinityGhost merged commit 04a7ede into OpenTabletDriver:master Jan 17, 2021
@AbstractQbit AbstractQbit deleted the adv-binding-button branch January 17, 2021 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request gui Affects driver GUI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants