Skip to content

Commit

Permalink
round the titleRect manual measurement
Browse files Browse the repository at this point in the history
  • Loading branch information
tj-devel709 committed Oct 8, 2024
1 parent 81c5c99 commit 2e8301f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ internal static CGRect GetTitleBoundingRect(this UIButton platformButton, double
NSStringDrawingOptions.UsesLineFragmentOrigin | NSStringDrawingOptions.UsesFontLeading | NSStringDrawingOptions.UsesDeviceMetrics,
null);

return new CGRect(boundingRectWithDeviceMetrics.Location, new CGSize(Math.Max(boundingRect.Width, boundingRectWithDeviceMetrics.Width), Math.Min(availableHeight, boundingRect.Height)));
return new CGRect(boundingRectWithDeviceMetrics.Location,
new CGSize(Math.Ceiling(Math.Max(boundingRect.Width, boundingRectWithDeviceMetrics.Width)),
Math.Ceiling(Math.Min(availableHeight, boundingRect.Height))));
}

return CGRect.Empty;
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 2e8301f

Please sign in to comment.