From fb3978b2fbf0d69b48183bc0ef6b7ace2761a1a5 Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Wed, 20 Jun 2012 13:16:00 +0100 Subject: [PATCH] setup linux: set default window button --- SparkleShare/Linux/SparkleSetupWindow.cs | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/SparkleShare/Linux/SparkleSetupWindow.cs b/SparkleShare/Linux/SparkleSetupWindow.cs index db10dcf8..583e24f9 100755 --- a/SparkleShare/Linux/SparkleSetupWindow.cs +++ b/SparkleShare/Linux/SparkleSetupWindow.cs @@ -34,7 +34,7 @@ namespace SparkleShare { private VBox VBox; private VBox Wrapper; private VBox OptionArea; - private HButtonBox Buttons; + private HBox Buttons; public string Header; public string Description; @@ -107,11 +107,12 @@ namespace SparkleShare { } - private HButtonBox CreateButtonBox () + private HBox CreateButtonBox () { - return new HButtonBox () { + return new HBox () { BorderWidth = 0, - Layout = ButtonBoxStyle.End, + //Layout = ButtonBoxStyle.End, + Homogeneous = false, Spacing = 6 }; } @@ -119,15 +120,14 @@ namespace SparkleShare { public void AddButton (Button button) { + (button.Child as Label).Xpad = 15; Buttons.Add (button); - ShowAll (); } public void AddOption (Widget widget) { OptionArea.Add (widget); - ShowAll (); } @@ -180,6 +180,13 @@ namespace SparkleShare { new public void ShowAll () { + if (Buttons.Children.Length > 0) { + Button default_button = (Button) Buttons.Children [Buttons.Children.Length - 1]; + + default_button.CanDefault = true; + Default = default_button; + } + Present (); base.ShowAll (); }