-
-
Notifications
You must be signed in to change notification settings - Fork 318
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1456 from picoe/curtis/mac-ui-glitches
Mac: Fix a few UI glitches
- Loading branch information
Showing
11 changed files
with
241 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
using System; | ||
using Eto.Drawing; | ||
using Eto.Forms; | ||
using Eto.Mac.Forms.Controls; | ||
using Eto.Test.UnitTests; | ||
using NUnit.Framework; | ||
#if XAMMAC2 | ||
using AppKit; | ||
using CoreGraphics; | ||
#else | ||
using MonoMac.AppKit; | ||
using MonoMac.CoreGraphics; | ||
#if SDCOMPAT | ||
using CGSize = System.Drawing.SizeF; | ||
using CGRect = System.Drawing.RectangleF; | ||
using CGPoint = System.Drawing.PointF; | ||
#endif | ||
#endif | ||
|
||
namespace Eto.Test.Mac.UnitTests | ||
{ | ||
[TestFixture] | ||
public class CheckBoxTests : TestBase | ||
{ | ||
[Test, ManualTest] | ||
public void ButtonShouldNotBeClipped() | ||
{ | ||
ManualForm("All buttons should be fully visible without any clipping", form => | ||
{ | ||
form.Styles.Add<CheckBoxHandler>("small", c => | ||
{ | ||
c.Control.Cell.ControlSize = NSControlSize.Small; | ||
c.Control.Font = NSFont.SystemFontOfSize(NSFont.SystemFontSizeForControlSize(NSControlSize.Small)); | ||
}); | ||
form.Styles.Add<CheckBoxHandler>("mini", c => | ||
{ | ||
c.Control.Cell.ControlSize = NSControlSize.Mini; | ||
c.Control.Font = NSFont.SystemFontOfSize(NSFont.SystemFontSizeForControlSize(NSControlSize.Mini)); | ||
}); | ||
return new TableLayout | ||
{ | ||
Rows = | ||
{ | ||
new Panel { Height = 10, BackgroundColor = Colors.White }, | ||
new TableLayout(new TableRow(null, new CheckBox { Text = "Normal" }, null)), | ||
new Panel { Height = 10, BackgroundColor = Colors.White }, | ||
new TableLayout(new TableRow(null, new CheckBox { Text = "Small", Style = "small" }, null)), | ||
new Panel { Height = 10, BackgroundColor = Colors.White }, | ||
new TableLayout(new TableRow(null, new CheckBox { Text = "Mini", Style = "mini" }, null)), | ||
new Panel { Height = 10, BackgroundColor = Colors.White }, | ||
} | ||
}; | ||
}); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using System; | ||
using Eto.Drawing; | ||
using Eto.Forms; | ||
using Eto.Test.UnitTests; | ||
using NUnit.Framework; | ||
|
||
namespace Eto.Test.Mac.UnitTests | ||
{ | ||
[TestFixture] | ||
public class LabelTests : TestBase | ||
{ | ||
[Test, ManualTest] | ||
public void LabelWithDifferentFontSizesShouldShowCorrectly() | ||
{ | ||
ManualForm("Labels should show correctly.", form => | ||
{ | ||
return new TableLayout | ||
{ | ||
Rows = | ||
{ | ||
new Panel {BackgroundColor = Colors.White, Height = 10}, | ||
new TableLayout(new Label { Text = "Small Font", Wrap = WrapMode.None, Font = SystemFonts.Default(8) }), | ||
new Panel {BackgroundColor = Colors.White, Height = 10}, | ||
new TableLayout(new Label { Text = "Normal Font", Wrap = WrapMode.None }), | ||
new Panel {BackgroundColor = Colors.White, Height = 10}, | ||
new TableLayout(new Label { Text = "Large Font", Wrap = WrapMode.None, Font = SystemFonts.Default(48) }), | ||
new Panel {BackgroundColor = Colors.White, Height = 10}, | ||
} | ||
}; | ||
}); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.