diff options
author | Vsevolod Kukol <sevoku@microsoft.com> | 2016-09-26 14:28:35 +0300 |
---|---|---|
committer | Vsevolod Kukol <sevoku@microsoft.com> | 2016-09-26 14:44:02 +0300 |
commit | 23535a89198d3b86455b4e12ac7b34bd09c419ca (patch) | |
tree | 7ee7b24e81dcefb9d3fa1beaa73568ad8a6450e7 /main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Wizard | |
parent | b250ac5c7a8801fcdd14a4f84935831833d85aaa (diff) |
[Ide] Set default wizard dialog button
Diffstat (limited to 'main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Wizard')
-rw-r--r-- | main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Wizard/WizardDialog.cs | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Wizard/WizardDialog.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Wizard/WizardDialog.cs index b80e824280..034ef56923 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Wizard/WizardDialog.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Wizard/WizardDialog.cs @@ -164,14 +164,23 @@ namespace MonoDevelop.Ide.Gui.Wizard if (Toolkit.CurrentEngine.Type == ToolkitType.XamMac) { var s = cancelButton.Surface.GetPreferredSize (); - cancelButton.WidthRequest = Math.Max (s.Width + 16, 77); + cancelButton.MinWidth = Math.Max (s.Width + 16, 100); s = backButton.Surface.GetPreferredSize (); - backButton.WidthRequest = Math.Max (s.Width + 16, 77); + backButton.MinWidth = Math.Max (s.Width + 16, 100); s = nextButton.Surface.GetPreferredSize (); - nextButton.WidthRequest = Math.Max (s.Width + 16, 77); + nextButton.MinWidth = Math.Max (s.Width + 16, 100); buttonBox.Spacing = 0; statusImage.MarginRight = 6; + #if MAC + var nativeNext = nextButton.Surface.NativeWidget as AppKit.NSButton; + nativeNext.KeyEquivalent = "\r"; + #endif } else { + if (Toolkit.CurrentEngine.Type == ToolkitType.Gtk) { + var nativeNext = nextButton.Surface.NativeWidget as Gtk.Button; + nativeNext.CanDefault = true; + nativeNext.GrabDefault (); + } cancelButton.MinWidth = 70; backButton.MinWidth = 70; nextButton.MinWidth = 70; @@ -186,7 +195,7 @@ namespace MonoDevelop.Ide.Gui.Wizard buttonBox.PackEnd (statusImage, false, false); buttonBox.PackEnd (nextButton, false, false); buttonBox.PackEnd (backButton, false, false); - statusImage.VerticalPlacement = WidgetPlacement.Center; + statusImage.VerticalPlacement = cancelButton.VerticalPlacement = nextButton.VerticalPlacement = backButton.VerticalPlacement = WidgetPlacement.Center; container.PackStart (header); |