From d94562154c646871e5af85aeb9eca1ece86776f9 Mon Sep 17 00:00:00 2001 From: Matt Ward Date: Wed, 15 Jul 2015 17:25:16 +0100 Subject: [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. --- .../GtkAspNetProjectTemplateWizardPageWidget.cs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'main/src/addins') 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; + } } } -- cgit v1.2.3