Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions src/Core/src/Handlers/ProgressBar/ProgressBarHandler.iOS.cs
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
using System;
using Microsoft.Maui.Platform;
using ObjCRuntime;
using UIKit;

namespace Microsoft.Maui.Handlers
{
public partial class ProgressBarHandler : ViewHandler<IProgress, UIProgressView>
{
public override bool NeedsContainer => true;

protected override UIProgressView CreatePlatformView()
{
return new MauiProgressView(UIProgressViewStyle.Default);
return new UIProgressView(UIProgressViewStyle.Default);
}

public static void MapProgress(IProgressBarHandler handler, IProgress progress)
Expand Down
128 changes: 0 additions & 128 deletions src/Core/src/Platform/iOS/MauiProgressView.cs

This file was deleted.

1 change: 0 additions & 1 deletion src/Core/src/PublicAPI/net-ios/PublicAPI.Unshipped.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#nullable enable
override Microsoft.Maui.Handlers.LabelHandler.GetDesiredSize(double widthConstraint, double heightConstraint) -> Microsoft.Maui.Graphics.Size
override Microsoft.Maui.Handlers.ProgressBarHandler.NeedsContainer.get -> bool
override Microsoft.Maui.Handlers.ShapeViewHandler.GetDesiredSize(double widthConstraint, double heightConstraint) -> Microsoft.Maui.Graphics.Size
override Microsoft.Maui.Handlers.StepperHandler.GetDesiredSize(double widthConstraint, double heightConstraint) -> Microsoft.Maui.Graphics.Size
override Microsoft.Maui.MauiUIApplicationDelegate.ValidateCommand(UIKit.UICommand! command) -> void
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#nullable enable
override Microsoft.Maui.Handlers.LabelHandler.GetDesiredSize(double widthConstraint, double heightConstraint) -> Microsoft.Maui.Graphics.Size
override Microsoft.Maui.Handlers.ProgressBarHandler.NeedsContainer.get -> bool
override Microsoft.Maui.Handlers.ShapeViewHandler.GetDesiredSize(double widthConstraint, double heightConstraint) -> Microsoft.Maui.Graphics.Size
override Microsoft.Maui.Handlers.StepperHandler.GetDesiredSize(double widthConstraint, double heightConstraint) -> Microsoft.Maui.Graphics.Size
override Microsoft.Maui.MauiUIApplicationDelegate.ValidateCommand(UIKit.UICommand! command) -> void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,10 +306,12 @@ public virtual async Task ReturnsNonEmptyNativeBoundingBox(int size)
var nativeBoundingBox = await GetValueAsync(view, handler => GetBoundingBox(handler));
Assert.NotEqual(nativeBoundingBox, Graphics.Rect.Zero);

// Currently there's an issue with label/progress where they don't set the frame size to
// the explicit Width and Height values set
// https://github.com/dotnet/maui/issues/7935
if (view is ILabel)
{
var expectedSize = new Size(size, size);
AssertWithinTolerance(expectedSize, nativeBoundingBox.Size);
// TODO:
}
else if (view is IBorderView)
{
Expand All @@ -336,8 +338,7 @@ public virtual async Task ReturnsNonEmptyNativeBoundingBox(int size)
#endif
else if (view is IProgress)
{
var expectedSize = new Size(size, size);
AssertWithinTolerance(expectedSize, nativeBoundingBox.Size);
AssertWithinTolerance(size, nativeBoundingBox.Size.Width);
}
else
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System;
using System.Threading.Tasks;
using Microsoft.Maui.DeviceTests.Stubs;
using Microsoft.Maui.Graphics;
using Microsoft.Maui.Handlers;
using ObjCRuntime;
Expand All @@ -17,24 +16,6 @@ UIProgressView GetNativeProgressBar(ProgressBarHandler progressBarHandler) =>
double GetNativeProgress(ProgressBarHandler progressBarHandler) =>
GetNativeProgressBar(progressBarHandler).Progress;

[Theory(DisplayName = "Native ProgressBar Bounding Box Honors Explicit Size")]
[InlineData(1)]
[InlineData(100)]
[InlineData(1000)]
public async Task NativeProgressBarBoundingBoxHonorsExplicitSize(int size)
{
var progressBar = new ProgressBarStub
{
Height = size,
Width = size,
Progress = 0.5,
};

var nativeBoundingBox = await GetValueAsync(progressBar, handler => GetNativeProgressBar(handler).GetBoundingBox());

AssertWithinTolerance(new Size(size, size), nativeBoundingBox.Size);
}

async Task ValidateNativeProgressColor(IProgress progressBar, Color color, Action action = null)
{
var expected = await GetValueAsync(progressBar, handler =>
Expand Down
Loading