From 13f106eba50e8ca37df042d4667e795936a04171 Mon Sep 17 00:00:00 2001 From: Stephen Hawley Date: Wed, 15 May 2024 09:49:02 -0400 Subject: [PATCH] whitespace issues. --- src/Core/src/Platform/iOS/MauiCheckBox.cs | 38 +++++++++---------- .../src/Platform/iOS/TextFieldExtensions.cs | 13 +++---- 2 files changed, 25 insertions(+), 26 deletions(-) diff --git a/src/Core/src/Platform/iOS/MauiCheckBox.cs b/src/Core/src/Platform/iOS/MauiCheckBox.cs index aef75a4c9d79..6a1974e11fbc 100644 --- a/src/Core/src/Platform/iOS/MauiCheckBox.cs +++ b/src/Core/src/Platform/iOS/MauiCheckBox.cs @@ -187,17 +187,17 @@ UIImage CreateCheckBox(UIImage? check) return image; } else { - UIGraphics.BeginImageContextWithOptions(new CGSize(DefaultSize, DefaultSize), false, 0); - var context = UIGraphics.GetCurrentContext(); - context.SaveState(); + UIGraphics.BeginImageContextWithOptions(new CGSize(DefaultSize, DefaultSize), false, 0); + var context = UIGraphics.GetCurrentContext(); + context.SaveState(); - RenderCheckMark(context, check); + RenderCheckMark(context, check); - context.RestoreState(); - var img = UIGraphics.GetImageFromCurrentImageContext(); - UIGraphics.EndImageContext(); + context.RestoreState(); + var img = UIGraphics.GetImageFromCurrentImageContext(); + UIGraphics.EndImageContext(); - return img; + return img; } } @@ -251,21 +251,21 @@ static UIImage CreateCheckMark() static void RenderCheckMark(CGContext context) { - context.SaveState(); + context.SaveState(); - var vPadding = LineWidth / 2; - var hPadding = LineWidth / 2; - var diameter = DefaultSize - LineWidth; + var vPadding = LineWidth / 2; + var hPadding = LineWidth / 2; + var diameter = DefaultSize - LineWidth; - var checkPath = CreateCheckPath(); + var checkPath = CreateCheckPath(); - context.TranslateCTM(hPadding + (nfloat)(0.05 * diameter), vPadding + (nfloat)(0.1 * diameter)); - context.ScaleCTM(diameter, diameter); - DrawCheckMark(checkPath); - UIColor.White.SetStroke(); - checkPath.Stroke(); + context.TranslateCTM(hPadding + (nfloat)(0.05 * diameter), vPadding + (nfloat)(0.1 * diameter)); + context.ScaleCTM(diameter, diameter); + DrawCheckMark(checkPath); + UIColor.White.SetStroke(); + checkPath.Stroke(); - context.RestoreState(); + context.RestoreState(); } public override CGSize SizeThatFits(CGSize size) diff --git a/src/Core/src/Platform/iOS/TextFieldExtensions.cs b/src/Core/src/Platform/iOS/TextFieldExtensions.cs index 4e8d400f7684..a96e7f82e999 100644 --- a/src/Core/src/Platform/iOS/TextFieldExtensions.cs +++ b/src/Core/src/Platform/iOS/TextFieldExtensions.cs @@ -254,14 +254,13 @@ internal static void UpdateClearButtonColor(this UITextField textField, IEntry e static void PaintButtonRect(CGContext? context, UIImage image, UIColor color) { - image.Draw(CGPoint.Empty, CGBlendMode.Normal, 1.0f); - context?.SetFillColor(color.CGColor); - context?.SetBlendMode(CGBlendMode.SourceIn); - context?.SetAlpha(1.0f); - - var rect = new CGRect(CGPoint.Empty.X, CGPoint.Empty.Y, image.Size.Width, image.Size.Height); - context?.FillRect(rect); + image.Draw(CGPoint.Empty, CGBlendMode.Normal, 1.0f); + context?.SetFillColor(color.CGColor); + context?.SetBlendMode(CGBlendMode.SourceIn); + context?.SetAlpha(1.0f); + var rect = new CGRect(CGPoint.Empty.X, CGPoint.Empty.Y, image.Size.Width, image.Size.Height); + context?.FillRect(rect); } } }