Skip to content

Commit

Permalink
chore: Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinZikmund committed Sep 10, 2021
1 parent 8e99b08 commit 6be367b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
7 changes: 7 additions & 0 deletions src/Uno.UI.FluentTheme/Uno.UI.FluentTheme.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@
<ProjectReference Include="..\Uno.UI\Uno.UI.csproj" />
</ItemGroup>

<ItemGroup Condition="$(IsMonoAndroid) or $(IsXamarinIOS) or $(IsXamarinMac)">
<Reference Include="System.Numerics" />
<Reference Include="System.Numerics.Vectors" />
<Reference Include="System.json" />
<Reference Include="System.Memory" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Uno.SourceGenerationTasks" />
</ItemGroup>
Expand Down
12 changes: 8 additions & 4 deletions src/Uno.UI.Tests/Windows_UI_Xaml/Given_ThemeResource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,13 @@ public async Task When_Theme_Changed_ResourceKey()

var textBlock = page.ResourceKeyThemedTextBlock;

Assert.AreEqual(Colors.Black, (textBlock.Foreground as SolidColorBrush).Color);
// Dark text
Assert.IsTrue(((SolidColorBrush)textBlock.Foreground).Color.R < 100);

await SwapSystemTheme();

Assert.AreEqual(Colors.White, (textBlock.Foreground as SolidColorBrush).Color);
// Light text
Assert.IsTrue(((SolidColorBrush)textBlock.Foreground).Color.R > 200);
}
}

Expand All @@ -88,11 +90,13 @@ public async Task When_Theme_Changed_ImplicitStyle()

app.HostView.Children.Add(button);

Assert.AreEqual(Colors.Black, (button.Foreground as SolidColorBrush).Color);
// Dark text
Assert.IsTrue(((SolidColorBrush)button.Foreground).Color.R < 100);

await SwapSystemTheme();

Assert.AreEqual(Colors.White, (button.Foreground as SolidColorBrush).Color);
// Light text
Assert.IsTrue(((SolidColorBrush)button.Foreground).Color.R > 200);
}
}

Expand Down

0 comments on commit 6be367b

Please sign in to comment.