Browse Source
Merge pull request #8653 from robloo/more-simple-theme-renaming
More simple theme renaming
pull/8657/head
Max Katz
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with
6 additions and
6 deletions
-
src/Avalonia.Build.Tasks/XamlCompilerTaskExecutor.cs
-
src/Avalonia.Controls.ColorPicker/Themes/Simple/Simple.xaml
-
tests/Avalonia.Benchmarks/Themes/ThemeBenchmark.cs
-
tests/Avalonia.UnitTests/TestServices.cs
|
|
|
@ -326,8 +326,8 @@ namespace Avalonia.Build.Tasks |
|
|
|
var op = i[c].Operand as MethodReference; |
|
|
|
|
|
|
|
// TODO: Throw an error
|
|
|
|
// This usually happens when same XAML resource was added twice for some weird reason
|
|
|
|
// We currently support it for dual-named default theme resource
|
|
|
|
// This usually happens when the same XAML resource was added twice for some weird reason
|
|
|
|
// We currently support it for dual-named default theme resources
|
|
|
|
if (op != null |
|
|
|
&& op.Name == TrampolineName) |
|
|
|
{ |
|
|
|
|
|
|
|
@ -41,7 +41,7 @@ |
|
|
|
<ResourceInclude Source="avares://Avalonia.Controls.ColorPicker/Themes/Simple/ColorSpectrum.xaml" /> |
|
|
|
|
|
|
|
<!-- Controls --> |
|
|
|
<!-- Note the ColorPicker and ColorView are unsupported in the default theme --> |
|
|
|
<!-- Note the ColorPicker and ColorView are currently unsupported in the simple theme --> |
|
|
|
<!-- These controls depend on fluent styles for TabControl, Button, TextBox, etc. --> |
|
|
|
|
|
|
|
</ResourceDictionary.MergedDictionaries> |
|
|
|
|
|
|
|
@ -41,7 +41,7 @@ namespace Avalonia.Benchmarks.Themes |
|
|
|
[Benchmark] |
|
|
|
[Arguments(SimpleThemeMode.Dark)] |
|
|
|
[Arguments(SimpleThemeMode.Light)] |
|
|
|
public bool InitDefaultTheme(SimpleThemeMode mode) |
|
|
|
public bool InitSimpleTheme(SimpleThemeMode mode) |
|
|
|
{ |
|
|
|
UnitTestApplication.Current.Styles[0] = new SimpleTheme(new Uri("resm:Styles?assembly=Avalonia.Benchmarks")) |
|
|
|
{ |
|
|
|
|
|
|
|
@ -24,7 +24,7 @@ namespace Avalonia.UnitTests |
|
|
|
renderInterface: new MockPlatformRenderInterface(), |
|
|
|
standardCursorFactory: Mock.Of<ICursorFactory>(), |
|
|
|
styler: new Styler(), |
|
|
|
theme: () => CreateDefaultTheme(), |
|
|
|
theme: () => CreateSimpleTheme(), |
|
|
|
threadingInterface: Mock.Of<IPlatformThreadingInterface>(x => x.CurrentThreadIsLoopThread == true), |
|
|
|
fontManagerImpl: new MockFontManagerImpl(), |
|
|
|
textShaperImpl: new MockTextShaperImpl(), |
|
|
|
@ -169,7 +169,7 @@ namespace Avalonia.UnitTests |
|
|
|
windowImpl: windowImpl ?? WindowImpl); |
|
|
|
} |
|
|
|
|
|
|
|
private static IStyle CreateDefaultTheme() |
|
|
|
private static IStyle CreateSimpleTheme() |
|
|
|
{ |
|
|
|
return new SimpleTheme { Mode = SimpleThemeMode.Light }; |
|
|
|
} |
|
|
|
|