Skip to content

Commit

Permalink
Merge pull request #60 from Clancey/jon/dev
Browse files Browse the repository at this point in the history
Fixed some clipping and layout issues on iOS.
  • Loading branch information
jonlipsky committed Jul 23, 2019
2 parents 71efaae + 19130da commit f96821b
Show file tree
Hide file tree
Showing 23 changed files with 175 additions and 167 deletions.
97 changes: 0 additions & 97 deletions HotUI.sln
Expand Up @@ -11,16 +11,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Sample", "Sample", "{C3FDCD
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Platforms", "Platforms", "{AB9AD206-4B1E-4B0C-88A2-5C769314E8A4}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Forms", "Forms", "{3D79CEB1-37D9-4BA3-ACF3-DC9A89C92571}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HotUI.Forms.Sample", "sample\Forms\HotUI.Forms.Sample\HotUI.Forms.Sample.csproj", "{618C336D-1E53-49B9-A554-7D2B9671DEC5}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HotUI.Forms", "src\HotUI.Forms\HotUI.Forms.csproj", "{92415B8D-D51B-46A1-A6E6-EF8C3B749067}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HotUI.Forms.Sample.Android", "sample\Forms\HotUI.Forms.Sample.Android\HotUI.Forms.Sample.Android.csproj", "{9D3CC647-89F9-4BD5-B5E8-29100F640FCA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HotUI.Forms.Sample.iOS", "sample\Forms\HotUI.Forms.Sample.iOS\HotUI.Forms.Sample.iOS.csproj", "{1E09C5C6-52C2-448D-80E8-A00858BBFF4B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HotUI.iOS", "src\HotUI.iOS\HotUI.iOS.csproj", "{9DF36DBF-AFE6-438D-B7A6-1B5FB3D1D6D1}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HotUI.iOS.Sample", "sample\HotUI.iOS.Sample\HotUI.iOS.Sample.csproj", "{12BE5947-A64A-4968-96A6-5CA3CE36C244}"
Expand Down Expand Up @@ -135,34 +127,6 @@ Global
{1817646E-E71E-48CF-80A4-3030EF870D61}.Release|x64.Build.0 = Release|Any CPU
{1817646E-E71E-48CF-80A4-3030EF870D61}.Release|x86.ActiveCfg = Release|Any CPU
{1817646E-E71E-48CF-80A4-3030EF870D61}.Release|x86.Build.0 = Release|Any CPU
{618C336D-1E53-49B9-A554-7D2B9671DEC5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{618C336D-1E53-49B9-A554-7D2B9671DEC5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{618C336D-1E53-49B9-A554-7D2B9671DEC5}.Debug|ARM.ActiveCfg = Debug|Any CPU
{618C336D-1E53-49B9-A554-7D2B9671DEC5}.Debug|ARM.Build.0 = Debug|Any CPU
{618C336D-1E53-49B9-A554-7D2B9671DEC5}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{618C336D-1E53-49B9-A554-7D2B9671DEC5}.Debug|ARM64.Build.0 = Debug|Any CPU
{618C336D-1E53-49B9-A554-7D2B9671DEC5}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{618C336D-1E53-49B9-A554-7D2B9671DEC5}.Debug|iPhone.Build.0 = Debug|Any CPU
{618C336D-1E53-49B9-A554-7D2B9671DEC5}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{618C336D-1E53-49B9-A554-7D2B9671DEC5}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{618C336D-1E53-49B9-A554-7D2B9671DEC5}.Debug|x64.ActiveCfg = Debug|Any CPU
{618C336D-1E53-49B9-A554-7D2B9671DEC5}.Debug|x64.Build.0 = Debug|Any CPU
{618C336D-1E53-49B9-A554-7D2B9671DEC5}.Debug|x86.ActiveCfg = Debug|Any CPU
{618C336D-1E53-49B9-A554-7D2B9671DEC5}.Debug|x86.Build.0 = Debug|Any CPU
{618C336D-1E53-49B9-A554-7D2B9671DEC5}.Release|Any CPU.ActiveCfg = Debug|Any CPU
{618C336D-1E53-49B9-A554-7D2B9671DEC5}.Release|Any CPU.Build.0 = Debug|Any CPU
{618C336D-1E53-49B9-A554-7D2B9671DEC5}.Release|ARM.ActiveCfg = Release|Any CPU
{618C336D-1E53-49B9-A554-7D2B9671DEC5}.Release|ARM.Build.0 = Release|Any CPU
{618C336D-1E53-49B9-A554-7D2B9671DEC5}.Release|ARM64.ActiveCfg = Release|Any CPU
{618C336D-1E53-49B9-A554-7D2B9671DEC5}.Release|ARM64.Build.0 = Release|Any CPU
{618C336D-1E53-49B9-A554-7D2B9671DEC5}.Release|iPhone.ActiveCfg = Release|Any CPU
{618C336D-1E53-49B9-A554-7D2B9671DEC5}.Release|iPhone.Build.0 = Release|Any CPU
{618C336D-1E53-49B9-A554-7D2B9671DEC5}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{618C336D-1E53-49B9-A554-7D2B9671DEC5}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{618C336D-1E53-49B9-A554-7D2B9671DEC5}.Release|x64.ActiveCfg = Release|Any CPU
{618C336D-1E53-49B9-A554-7D2B9671DEC5}.Release|x64.Build.0 = Release|Any CPU
{618C336D-1E53-49B9-A554-7D2B9671DEC5}.Release|x86.ActiveCfg = Release|Any CPU
{618C336D-1E53-49B9-A554-7D2B9671DEC5}.Release|x86.Build.0 = Release|Any CPU
{92415B8D-D51B-46A1-A6E6-EF8C3B749067}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{92415B8D-D51B-46A1-A6E6-EF8C3B749067}.Debug|Any CPU.Build.0 = Debug|Any CPU
{92415B8D-D51B-46A1-A6E6-EF8C3B749067}.Debug|ARM.ActiveCfg = Debug|Any CPU
Expand Down Expand Up @@ -191,63 +155,6 @@ Global
{92415B8D-D51B-46A1-A6E6-EF8C3B749067}.Release|x64.Build.0 = Release|Any CPU
{92415B8D-D51B-46A1-A6E6-EF8C3B749067}.Release|x86.ActiveCfg = Release|Any CPU
{92415B8D-D51B-46A1-A6E6-EF8C3B749067}.Release|x86.Build.0 = Release|Any CPU
{9D3CC647-89F9-4BD5-B5E8-29100F640FCA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9D3CC647-89F9-4BD5-B5E8-29100F640FCA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9D3CC647-89F9-4BD5-B5E8-29100F640FCA}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{9D3CC647-89F9-4BD5-B5E8-29100F640FCA}.Debug|ARM.ActiveCfg = Debug|Any CPU
{9D3CC647-89F9-4BD5-B5E8-29100F640FCA}.Debug|ARM.Build.0 = Debug|Any CPU
{9D3CC647-89F9-4BD5-B5E8-29100F640FCA}.Debug|ARM.Deploy.0 = Debug|Any CPU
{9D3CC647-89F9-4BD5-B5E8-29100F640FCA}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{9D3CC647-89F9-4BD5-B5E8-29100F640FCA}.Debug|ARM64.Build.0 = Debug|Any CPU
{9D3CC647-89F9-4BD5-B5E8-29100F640FCA}.Debug|ARM64.Deploy.0 = Debug|Any CPU
{9D3CC647-89F9-4BD5-B5E8-29100F640FCA}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{9D3CC647-89F9-4BD5-B5E8-29100F640FCA}.Debug|iPhone.Build.0 = Debug|Any CPU
{9D3CC647-89F9-4BD5-B5E8-29100F640FCA}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{9D3CC647-89F9-4BD5-B5E8-29100F640FCA}.Debug|x64.ActiveCfg = Debug|Any CPU
{9D3CC647-89F9-4BD5-B5E8-29100F640FCA}.Debug|x64.Build.0 = Debug|Any CPU
{9D3CC647-89F9-4BD5-B5E8-29100F640FCA}.Debug|x64.Deploy.0 = Debug|Any CPU
{9D3CC647-89F9-4BD5-B5E8-29100F640FCA}.Debug|x86.ActiveCfg = Debug|Any CPU
{9D3CC647-89F9-4BD5-B5E8-29100F640FCA}.Debug|x86.Build.0 = Debug|Any CPU
{9D3CC647-89F9-4BD5-B5E8-29100F640FCA}.Debug|x86.Deploy.0 = Debug|Any CPU
{9D3CC647-89F9-4BD5-B5E8-29100F640FCA}.Release|Any CPU.ActiveCfg = Debug|Any CPU
{9D3CC647-89F9-4BD5-B5E8-29100F640FCA}.Release|Any CPU.Build.0 = Debug|Any CPU
{9D3CC647-89F9-4BD5-B5E8-29100F640FCA}.Release|Any CPU.Deploy.0 = Debug|Any CPU
{9D3CC647-89F9-4BD5-B5E8-29100F640FCA}.Release|ARM.ActiveCfg = Release|Any CPU
{9D3CC647-89F9-4BD5-B5E8-29100F640FCA}.Release|ARM.Build.0 = Release|Any CPU
{9D3CC647-89F9-4BD5-B5E8-29100F640FCA}.Release|ARM.Deploy.0 = Release|Any CPU
{9D3CC647-89F9-4BD5-B5E8-29100F640FCA}.Release|ARM64.ActiveCfg = Release|Any CPU
{9D3CC647-89F9-4BD5-B5E8-29100F640FCA}.Release|ARM64.Build.0 = Release|Any CPU
{9D3CC647-89F9-4BD5-B5E8-29100F640FCA}.Release|ARM64.Deploy.0 = Release|Any CPU
{9D3CC647-89F9-4BD5-B5E8-29100F640FCA}.Release|iPhone.ActiveCfg = Release|Any CPU
{9D3CC647-89F9-4BD5-B5E8-29100F640FCA}.Release|iPhone.Build.0 = Release|Any CPU
{9D3CC647-89F9-4BD5-B5E8-29100F640FCA}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{9D3CC647-89F9-4BD5-B5E8-29100F640FCA}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{9D3CC647-89F9-4BD5-B5E8-29100F640FCA}.Release|x64.ActiveCfg = Release|Any CPU
{9D3CC647-89F9-4BD5-B5E8-29100F640FCA}.Release|x64.Build.0 = Release|Any CPU
{9D3CC647-89F9-4BD5-B5E8-29100F640FCA}.Release|x64.Deploy.0 = Release|Any CPU
{9D3CC647-89F9-4BD5-B5E8-29100F640FCA}.Release|x86.ActiveCfg = Release|Any CPU
{9D3CC647-89F9-4BD5-B5E8-29100F640FCA}.Release|x86.Build.0 = Release|Any CPU
{9D3CC647-89F9-4BD5-B5E8-29100F640FCA}.Release|x86.Deploy.0 = Release|Any CPU
{1E09C5C6-52C2-448D-80E8-A00858BBFF4B}.Debug|Any CPU.ActiveCfg = Debug|iPhoneSimulator
{1E09C5C6-52C2-448D-80E8-A00858BBFF4B}.Debug|Any CPU.Build.0 = Debug|iPhoneSimulator
{1E09C5C6-52C2-448D-80E8-A00858BBFF4B}.Debug|ARM.ActiveCfg = Debug|iPhone
{1E09C5C6-52C2-448D-80E8-A00858BBFF4B}.Debug|ARM64.ActiveCfg = Debug|iPhone
{1E09C5C6-52C2-448D-80E8-A00858BBFF4B}.Debug|iPhone.ActiveCfg = Debug|iPhone
{1E09C5C6-52C2-448D-80E8-A00858BBFF4B}.Debug|iPhone.Build.0 = Debug|iPhone
{1E09C5C6-52C2-448D-80E8-A00858BBFF4B}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
{1E09C5C6-52C2-448D-80E8-A00858BBFF4B}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
{1E09C5C6-52C2-448D-80E8-A00858BBFF4B}.Debug|x64.ActiveCfg = Debug|iPhone
{1E09C5C6-52C2-448D-80E8-A00858BBFF4B}.Debug|x86.ActiveCfg = Debug|iPhone
{1E09C5C6-52C2-448D-80E8-A00858BBFF4B}.Release|Any CPU.ActiveCfg = Debug|iPhoneSimulator
{1E09C5C6-52C2-448D-80E8-A00858BBFF4B}.Release|Any CPU.Build.0 = Debug|iPhoneSimulator
{1E09C5C6-52C2-448D-80E8-A00858BBFF4B}.Release|ARM.ActiveCfg = Release|iPhoneSimulator
{1E09C5C6-52C2-448D-80E8-A00858BBFF4B}.Release|ARM64.ActiveCfg = Release|iPhoneSimulator
{1E09C5C6-52C2-448D-80E8-A00858BBFF4B}.Release|iPhone.ActiveCfg = Release|iPhone
{1E09C5C6-52C2-448D-80E8-A00858BBFF4B}.Release|iPhone.Build.0 = Release|iPhone
{1E09C5C6-52C2-448D-80E8-A00858BBFF4B}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
{1E09C5C6-52C2-448D-80E8-A00858BBFF4B}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
{1E09C5C6-52C2-448D-80E8-A00858BBFF4B}.Release|x64.ActiveCfg = Release|iPhoneSimulator
{1E09C5C6-52C2-448D-80E8-A00858BBFF4B}.Release|x86.ActiveCfg = Release|iPhoneSimulator
{9DF36DBF-AFE6-438D-B7A6-1B5FB3D1D6D1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9DF36DBF-AFE6-438D-B7A6-1B5FB3D1D6D1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9DF36DBF-AFE6-438D-B7A6-1B5FB3D1D6D1}.Debug|ARM.ActiveCfg = Debug|Any CPU
Expand Down Expand Up @@ -764,11 +671,7 @@ Global
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{B2AB3B6E-89C6-4223-ACFF-4E3C027868A9} = {AB9AD206-4B1E-4B0C-88A2-5C769314E8A4}
{3D79CEB1-37D9-4BA3-ACF3-DC9A89C92571} = {C3FDCDB7-0C29-472D-A406-E2F21A4B0EAE}
{618C336D-1E53-49B9-A554-7D2B9671DEC5} = {3D79CEB1-37D9-4BA3-ACF3-DC9A89C92571}
{92415B8D-D51B-46A1-A6E6-EF8C3B749067} = {AB9AD206-4B1E-4B0C-88A2-5C769314E8A4}
{9D3CC647-89F9-4BD5-B5E8-29100F640FCA} = {3D79CEB1-37D9-4BA3-ACF3-DC9A89C92571}
{1E09C5C6-52C2-448D-80E8-A00858BBFF4B} = {3D79CEB1-37D9-4BA3-ACF3-DC9A89C92571}
{9DF36DBF-AFE6-438D-B7A6-1B5FB3D1D6D1} = {AB9AD206-4B1E-4B0C-88A2-5C769314E8A4}
{12BE5947-A64A-4968-96A6-5CA3CE36C244} = {C3FDCDB7-0C29-472D-A406-E2F21A4B0EAE}
{D058A769-9AE6-438F-960C-2ECC287F6D1E} = {C3FDCDB7-0C29-472D-A406-E2F21A4B0EAE}
Expand Down
2 changes: 1 addition & 1 deletion sample/Forms/HotUI.Forms.Sample.Android/MainActivity.cs
Expand Up @@ -18,7 +18,7 @@ protected override void OnCreate (Bundle savedInstanceState)

Xamarin.Essentials.Platform.Init (this, savedInstanceState);
global::Xamarin.Forms.Forms.Init (this, savedInstanceState);
LoadApplication (new App ());
LoadApplication (new HotUI.Forms.Sample.App());
}
public override void OnRequestPermissionsResult (int requestCode, string [] permissions, [GeneratedEnum] Android.Content.PM.Permission [] grantResults)
{
Expand Down
31 changes: 12 additions & 19 deletions sample/HotUI.Samples/AuditReportPage.cs
Expand Up @@ -12,10 +12,9 @@ public class AuditReportPage : View
[Body]
View body()
{
if (isLoading)
return new Text(() => "Loading...");
if (reports.Value.Count == 0)
return new Button(() => "Generate Report", async () =>
if (isLoading) return new Text(() => "Loading...");

if (reports.Value.Count == 0) return new Button(() => "Generate Report", async () =>
{
isLoading.Value = true;
try
Expand All @@ -28,24 +27,18 @@ View body()
isLoading.Value = false;
}
});

return new ListView<ApiAuditManager.AuditReport>(reports.Value)
{
Cell = (report) => new NavigationButton(
() => new AuditReportPageDetails().SetEnvironment("report", report))
Cell = (report) => new VStack(HorizontalAlignment.Leading)
{
new HStack()
{
new VStack(HorizontalAlignment.Leading)
{
new Text (report.View)
.Font(Font.System(20)),
new Text ($"Handler: {report.Handler}"),
new Text ($"Has Map? : {!report.MissingMapper}").Color(report.MissingMapper ? Color.Red : Color.Green),
new Text ($"Handled Properties: {report.HandledProperties.Count}").Color(report.HandledProperties.Count == 0 ? Color.Red : Color.Green),
new Text ($"Missing Count: {report.UnHandledProperties.Count}").Color(report.UnHandledProperties.Count == 0 ? Color.Green : Color.Red),
}.Padding().Font(Font.System(10))
}
},
new Text (report.View).Font(Font.System(20)),
new Text ($"Handler: {report.Handler}"),
new Text ($"Has Map? : {!report.MissingMapper}").Color(report.MissingMapper ? Color.Red : Color.Green),
new Text ($"Handled Properties: {report.HandledProperties.Count}").Color(report.HandledProperties.Count == 0 ? Color.Red : Color.Green),
new Text ($"Missing Count: {report.UnHandledProperties.Count}").Color(report.UnHandledProperties.Count == 0 ? Color.Green : Color.Red),
}.Frame(alignment:Alignment.Leading).Padding().Font(Font.System(10)),
ItemSelected = item => Navigation.Navigate(new AuditReportPageDetails().SetEnvironment("report", item))
};
}
}
Expand Down
9 changes: 4 additions & 5 deletions sample/HotUI.Samples/Comparisons/Section4.cs
Expand Up @@ -25,11 +25,10 @@ public class Section4 : View
{
[Body]
View body() =>
new Image("turtlerock.jpg")
.ClipShape(new Circle())
.Overlay(
new Circle().Stroke(Color.White, lineWidth: 4))
.Shadow(radius: 10);
new Image("turtlerock.jpg")
.ClipShape(new Circle())
.Overlay(new Circle().Stroke(Color.White, lineWidth: 4))
.Shadow(radius: 10).Background(Color.Green);
}

}
20 changes: 10 additions & 10 deletions sample/HotUI.Samples/ListViewSample1.cs
Expand Up @@ -27,16 +27,16 @@ View body() => new ListView<Song>(Songs)
{
Cell = (song) => new NavigationButton(() => new ListViewDetails(song))
{
new HStack {
new Image (song.ArtworkUrl).Frame(52, 52).Padding(4),
new VStack(HorizontalAlignment.Leading, spacing:2)
{
new Text (song.Title).Font(Font.System(17)),
new Text (song.Artist).Color(Color.Grey),
new Text (song.Album).Color(Color.Grey),
}.Font(Font.System(12))
}
}.Frame(height:60),
new HStack {
new Image (song.ArtworkUrl).Frame(52, 52).Padding(4),
new VStack(HorizontalAlignment.Leading, spacing:2)
{
new Text (song.Title).Font(Font.System(17)),
new Text (song.Artist).Color(Color.Grey),
new Text (song.Album).Color(Color.Grey),
}.Font(Font.System(12)),
}
}.Frame(height:60, alignment:Alignment.Leading),
}.OnSelected((song) =>
{
Console.WriteLine("Song Selected");
Expand Down
28 changes: 26 additions & 2 deletions sample/HotUI.Samples/Skia/SkiaSample3WithScrollview.cs
Expand Up @@ -25,9 +25,9 @@ View body() => new VStack()
new Text("Stroke Color!:"),
new TextField(_strokeColor),
},
new ScrollView
new ScrollView(Orientation.Horizontal)
{
new HStack
new HStack(spacing:8)
{
new Button("Black", () =>
{
Expand All @@ -40,6 +40,30 @@ View body() => new VStack()
new Button("Red", () =>
{
_strokeColor.Value = Color.Red.ToHexString();
}),
new Button("Green", () =>
{
_strokeColor.Value = Color.Green.ToHexString();
}),
new Button("Orange", () =>
{
_strokeColor.Value = Color.Orange.ToHexString();
}),
new Button("Yellow", () =>
{
_strokeColor.Value = Color.Yellow.ToHexString();
}),
new Button("Brown", () =>
{
_strokeColor.Value = Color.Brown.ToHexString();
}),
new Button("Salmon", () =>
{
_strokeColor.Value = Color.Salmon.ToHexString();
}),
new Button("Magenta", () =>
{
_strokeColor.Value = Color.Magenta.ToHexString();
})
},
},
Expand Down
3 changes: 2 additions & 1 deletion src/HotUI.Android/Handlers/HStackHandler.cs
Expand Up @@ -2,6 +2,7 @@
using System.Collections.Generic;
using Android.Widget;
using AView = Android.Views.View;
using AOrientation = Android.Widget.Orientation;

namespace HotUI.Android.Handlers
{
Expand All @@ -11,7 +12,7 @@ public class HStackHandler : LinearLayout, AndroidViewHandler

public HStackHandler() : base(AndroidContext.CurrentContext)
{
Orientation = Orientation.Vertical;
Orientation = AOrientation.Vertical;
}


Expand Down
3 changes: 2 additions & 1 deletion src/HotUI.Android/Handlers/VStackHandler.cs
Expand Up @@ -2,6 +2,7 @@
using System.Collections.Generic;
using Android.Widget;
using AView = Android.Views.View;
using AOrientation = Android.Widget.Orientation;

namespace HotUI.Android.Handlers
{
Expand All @@ -11,7 +12,7 @@ public class VStackHandler : LinearLayout, AndroidViewHandler

public VStackHandler() : base(AndroidContext.CurrentContext)
{
Orientation = Orientation.Vertical;
Orientation = AOrientation.Vertical;
}

public AView View => this;
Expand Down
2 changes: 1 addition & 1 deletion src/HotUI.Mac/Handlers/AbstractControlHandler.cs
Expand Up @@ -74,7 +74,7 @@ public virtual SizeF Measure(SizeF availableSize)
if (_nativeView is NSControl control)
return control.SizeThatFits(availableSize.ToCGSize()).ToSizeF();

return availableSize;
return HotUI.View.IllTakeWhatYouCanGive;
}

public void SetFrame(RectangleF frame)
Expand Down
2 changes: 1 addition & 1 deletion src/HotUI.Mac/Handlers/AbstractHandler.cs
Expand Up @@ -69,7 +69,7 @@ public bool HasContainer

public virtual SizeF Measure(SizeF availableSize)
{
return availableSize;
return HotUI.View.IllTakeWhatYouCanGive;
}

public void SetFrame(RectangleF frame)
Expand Down
2 changes: 1 addition & 1 deletion src/HotUI.Mac/Handlers/AbstractLayoutHandler.cs
Expand Up @@ -37,7 +37,7 @@ public bool HasContainer

public SizeF Measure(SizeF available)
{
return available;
return HotUI.View.IllTakeWhatYouCanGive;
}

public void SetFrame(RectangleF frame)
Expand Down

0 comments on commit f96821b

Please sign in to comment.