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
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,9 @@ void UpdateIconAndStyle(ToolbarItem item)
}
item.IconImageSource.LoadImage(mauiContext, result =>
{
Image = result?.Value;
Image = item.IconImageSource is not FontImageSource
? result?.Value.ImageWithRenderingMode(UIImageRenderingMode.AlwaysOriginal)
: result?.Value;
Style = UIBarButtonItemStyle.Plain;
});
}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 36 additions & 0 deletions src/Controls/tests/TestCases.HostApp/Issues/Issue28822.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
namespace Maui.Controls.Sample.Issues
{

[Issue(IssueTracker.Github, 28822, "ToolbarItem behavior with ImageSource iOS", PlatformAffected.iOS)]
public class Issue28822NavigationPage : NavigationPage
{
public Issue28822NavigationPage() : base(new Issue28822()) { }

public class Issue28822 : ContentPage
{
public Issue28822()
{
ToolbarItems.Add(new ToolbarItem()
{
IconImageSource = ImageSource.FromFile("dotnet_bot.png"),
});

ToolbarItems.Add(new ToolbarItem()
{
IconImageSource = new FontImageSource()
{
Glyph = "+",
Color = Colors.Red,
Size = 20,
}
});

Content = new Label()
{
Text = "Hello, World!",
AutomationId = "HelloWorldLabel"
};
}
}
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using NUnit.Framework;
using UITest.Appium;
using UITest.Core;

namespace Microsoft.Maui.TestCases.Tests.Issues
{
public class Issue28822 : _IssuesUITest
{
public Issue28822(TestDevice testDevice) : base(testDevice)
{
}

public override string Issue => "ToolbarItem behavior with ImageSource iOS";

[Test]
[Category(UITestCategories.ToolbarItem)]
public void ToolbarItemShouldBeCorrectlyRendered()
{
App.WaitForElement("HelloWorldLabel");
VerifyScreenshot();
}
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading