diff options
author | Matt Ward <matt.ward@xamarin.com> | 2015-07-15 19:25:16 +0300 |
---|---|---|
committer | Matt Ward <matt.ward@xamarin.com> | 2015-07-15 19:25:16 +0300 |
commit | d94562154c646871e5af85aeb9eca1ece86776f9 (patch) | |
tree | 1b102bd5ca3e3a76de5db7f5ab07b2df2f90373b /main/src | |
parent | fc07a851df0073486284b76aae843aa1ae78b919 (diff) |
[AspNet] Fix text alignment in wizard page on Mac.
Left hand label bottom edge was not aligned with the check box
text.
Left hand side of text in description below check box was not
aligned with the check box text.
Diffstat (limited to 'main/src')
-rw-r--r-- | main/src/addins/AspNet/Projects/GtkAspNetProjectTemplateWizardPageWidget.cs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/main/src/addins/AspNet/Projects/GtkAspNetProjectTemplateWizardPageWidget.cs b/main/src/addins/AspNet/Projects/GtkAspNetProjectTemplateWizardPageWidget.cs index 2d59d4b9a3..010b681d33 100644 --- a/main/src/addins/AspNet/Projects/GtkAspNetProjectTemplateWizardPageWidget.cs +++ b/main/src/addins/AspNet/Projects/GtkAspNetProjectTemplateWizardPageWidget.cs @@ -29,6 +29,7 @@ using System; using Gdk;
using Gtk;
using MonoDevelop.Components;
+using MonoDevelop.Core;
namespace MonoDevelop.AspNet.Projects
{
@@ -45,6 +46,20 @@ namespace MonoDevelop.AspNet.Projects {
this.Build ();
+ if (Platform.IsMac) {
+ int labelPaddingHeight = 5;
+ if (IsYosemiteOrHigher ())
+ labelPaddingHeight--;
+ includeLabelPadding.HeightRequest = labelPaddingHeight;
+ testingLabelPadding.HeightRequest = labelPaddingHeight;
+
+ int leftPaddingWidth = 28;
+ mvcDescriptionLeftHandPadding.WidthRequest = leftPaddingWidth;
+ webFormsDescriptionLeftHandPadding.WidthRequest = leftPaddingWidth;
+ webApiDescriptionLeftHandPadding.WidthRequest = leftPaddingWidth;
+ includeUnitTestProjectDescriptionLeftHandPadding.WidthRequest = leftPaddingWidth;
+ }
+
backgroundImage = Xwt.Drawing.Image.FromResource ("aspnet-wizard-page.png");
backgroundImageView = new ImageView (backgroundImage);
backgroundImageView.Xalign = 1;
@@ -125,6 +140,11 @@ namespace MonoDevelop.AspNet.Projects configurationTable.Remove (widget);
widget.Destroy ();
}
+
+ bool IsYosemiteOrHigher ()
+ {
+ return Platform.OSVersion >= MacSystemInformation.Yosemite;
+ }
}
}
|