-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[iOS] Fix wrong gray color using transparent in iOS gradients (#17696)
* Fix wrong gray color using transparent in iOS gradients * Added UI Test * Updated test screenshot * Added a new sample and test * Updated test * Fix build errors
- Loading branch information
1 parent
e737057
commit ba78d8a
Showing
9 changed files
with
245 additions
and
7 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
src/Controls/samples/Controls.Sample.UITests/Issues/Issues17366.xaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | ||
x:Class="Maui.Controls.Sample.Issues.Issue17366"> | ||
<StackLayout | ||
Padding="12"> | ||
<Label | ||
AutomationId="WaitForStubControl" | ||
Text="Background (Gradient using a transparent color)"/> | ||
<Frame | ||
HeightRequest="200"> | ||
<Frame.Background> | ||
<LinearGradientBrush | ||
StartPoint="0,0" | ||
EndPoint="0,1"> | ||
<GradientStop | ||
Color="Transparent" | ||
Offset="0.0"/> | ||
<GradientStop | ||
Color="Red" | ||
Offset="1.00"/> | ||
</LinearGradientBrush> | ||
</Frame.Background> | ||
<Label | ||
Text="Issue 17366" /> | ||
</Frame> | ||
</StackLayout> | ||
</ContentPage> |
16 changes: 16 additions & 0 deletions
16
src/Controls/samples/Controls.Sample.UITests/Issues/Issues17366.xaml.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using Microsoft.Maui.Controls; | ||
using Microsoft.Maui.Controls.Xaml; | ||
using Microsoft.Maui.Platform; | ||
|
||
namespace Maui.Controls.Sample.Issues | ||
{ | ||
[XamlCompilation(XamlCompilationOptions.Compile)] | ||
[Issue(IssueTracker.Github, 17366, "Wrong gray color using transparent in iOS gradients", PlatformAffected.iOS)] | ||
public partial class Issue17366 : ContentPage | ||
{ | ||
public Issue17366() | ||
{ | ||
InitializeComponent(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using NUnit.Framework; | ||
using UITest.Appium; | ||
using UITest.Core; | ||
|
||
namespace Microsoft.Maui.AppiumTests.Issues | ||
{ | ||
public class Issue17366 : _IssuesUITest | ||
{ | ||
public Issue17366(TestDevice device) : base(device) | ||
{ | ||
} | ||
|
||
public override string Issue => "Wrong gray color using transparent in iOS gradients"; | ||
|
||
[Test] | ||
public void Issue17366Test() | ||
{ | ||
this.IgnoreIfPlatforms(new TestDevice[] { TestDevice.Android, TestDevice.Mac, TestDevice.Windows }, | ||
"The bug only happens on iOS; see https://github.com/dotnet/maui/pull/17789"); | ||
|
||
App.WaitForElement("WaitForStubControl"); | ||
VerifyScreenshot(); | ||
} | ||
} | ||
} |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters