Skip to content

Commit

Permalink
Improvements & snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
kubaflo authored and jfversluis committed Feb 5, 2025
1 parent 7f13e21 commit 6412c62
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 7 deletions.
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
@@ -1,4 +1,5 @@
using NUnit.Framework;
#if ANDROID || IOS
using NUnit.Framework;
using UITest.Appium;
using UITest.Core;

Expand All @@ -21,4 +22,5 @@ public void FontImageSourceShouldHonorColor()
VerifyScreenshot();
}
}
}
}
#endif
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
Expand Up @@ -118,11 +118,19 @@ public override void SetImageSource(UIImage? platformImage)

try
{
button.SetImage(resizedImage.ImageWithRenderingMode(UIImageRenderingMode.Automatic), UIControlState.Normal);
var tintColor = item.GetTextColor();

if (tintColor != null)
button.TintColor = tintColor.ToPlatform();
if (item.Source is IFontImageSource fontImageSource && fontImageSource.Color != null)
{
button.SetImage(resizedImage.ImageWithRenderingMode(UIImageRenderingMode.Automatic), UIControlState.Normal);
}
else
{
button.SetImage(resizedImage.ImageWithRenderingMode(UIImageRenderingMode.AlwaysTemplate), UIControlState.Normal);

var tintColor = item.GetTextColor();

if (tintColor != null)
button.TintColor = tintColor.ToPlatform();
}
}
catch (Exception)
{
Expand Down

0 comments on commit 6412c62

Please sign in to comment.