Skip to content

Commit f8fe8ef

Browse files
committed
Release v2.1.0
Fix system dark mode
1 parent 8cfcecc commit f8fe8ef

File tree

8 files changed

+13
-13
lines changed

8 files changed

+13
-13
lines changed

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project>
22
<PropertyGroup>
33
<Nullable>enable</Nullable>
4-
<AvaloniaVersion>11.2.1</AvaloniaVersion>
4+
<AvaloniaVersion>11.2.2</AvaloniaVersion>
55
</PropertyGroup>
66
</Project>

src/Vocup.Packaging/Package.appxmanifest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities" IgnorableNamespaces="uap mp rescap">
3-
<Identity Name="9961VectorData.Vocup" Publisher="CN=FDFCA12E-D0B5-4F1F-869D-7F97CD35B39E" Version="2.0.0.0" />
3+
<Identity Name="9961VectorData.Vocup" Publisher="CN=FDFCA12E-D0B5-4F1F-869D-7F97CD35B39E" Version="2.1.0.0" />
44
<Properties>
55
<DisplayName>Vocup</DisplayName>
66
<PublisherDisplayName>Daniel Lerch</PublisherDisplayName>

src/Vocup.WinForms/Util/App.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@ public partial class App : Vocup.App
77
public override void OnFrameworkInitializationCompleted()
88
{
99
#pragma warning disable WFO5001 // Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
10-
RequestedThemeVariant = Application.ColorMode switch
10+
RequestedThemeVariant = (Application.ColorMode, Application.SystemColorMode) switch
1111
{
12-
SystemColorMode.Dark => Avalonia.Styling.ThemeVariant.Dark,
12+
(SystemColorMode.System, SystemColorMode.Dark) => Avalonia.Styling.ThemeVariant.Dark,
13+
(SystemColorMode.Dark, _) => Avalonia.Styling.ThemeVariant.Dark,
1314
_ => Avalonia.Styling.ThemeVariant.Light,
1415
};
1516
#pragma warning restore WFO5001 // Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.

src/Vocup.WinForms/Vocup.WinForms.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<Description>Vocabulary training application</Description>
1818
<Company>VectorData</Company>
1919
<Copyright>Copyright © 2011 Florian Amstutz, © 2018-2024 Daniel Lerch.</Copyright>
20-
<Version>2.0.0</Version>
20+
<Version>2.1.0</Version>
2121
<NeutralLanguage>en</NeutralLanguage>
2222
</PropertyGroup>
2323
<ItemGroup>

tests/Vocup.UnitTests/EvaluatorTest.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public void TestSynonymOrder()
3636
[InlineData("anxiety; fear", "fear; anxiety")]
3737
public void TestInlineSynonymOrder(string result, string input)
3838
{
39-
Assert.Equal(PracticeResult.Correct, evaluator.GetResult(new[] { result }, new[] { input }));
39+
Assert.Equal(PracticeResult.Correct, evaluator.GetResult([result], [input]));
4040
}
4141

4242
[Theory]
@@ -48,7 +48,7 @@ public void TestInlineSynonymOrder(string result, string input)
4848
[InlineData("(to) crave (for) sth", "to crave (for) sth")] // half long, half original
4949
public void TestOptionalExpressions(string result, string input)
5050
{
51-
Assert.Equal(PracticeResult.Correct, evaluator.GetResult(new[] { result }, new[] { input }));
51+
Assert.Equal(PracticeResult.Correct, evaluator.GetResult([result], [input]));
5252
}
5353

5454
[Theory]
@@ -59,6 +59,6 @@ public void TestOptionalExpressions(string result, string input)
5959
[InlineData(PracticeResult.Wrong, "upset (about sth)/(that)", "upset/")]
6060
public void TestOptionalEdgeCases(PracticeResult expected, string result, string input)
6161
{
62-
Assert.Equal(expected, evaluator.GetResult(new[] { result }, new[] { input }));
62+
Assert.Equal(expected, evaluator.GetResult([result], [input]));
6363
}
6464
}

tests/Vocup.UnitTests/ListCompositorTest.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using System;
2-
using System.Collections.Generic;
32
using Vocup.Util;
43
using Xunit;
54

@@ -18,7 +17,7 @@ public void TestAddArgumentNull()
1817
public void TestAddArgumentOutOfRange()
1918
{
2019
var compositor = new ListCompositor<int>();
21-
Assert.Throws<ArgumentOutOfRangeException>(() => compositor.AddSource(new List<int>(), -0.3));
20+
Assert.Throws<ArgumentOutOfRangeException>(() => compositor.AddSource([], -0.3));
2221
}
2322

2423
[Fact]
@@ -27,7 +26,7 @@ public void TestToListArgumentOutOfRange()
2726
var compositor = new ListCompositor<int>();
2827
Assert.Throws<ArgumentOutOfRangeException>(() => compositor.ToList(-1));
2928
Assert.Throws<ArgumentOutOfRangeException>(() => compositor.ToList(1));
30-
compositor.AddSource(new List<int>() { 3, 4, 5, 6, 7, 8 }, 0.3);
29+
compositor.AddSource([3, 4, 5, 6, 7, 8], 0.3);
3130
Assert.Throws<ArgumentOutOfRangeException>(() => compositor.ToList(13));
3231
}
3332
}

tests/Vocup.UnitTests/SettingsTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public async Task TestSettings()
1515
string basename = "vocup_settings";
1616

1717
VersionedSettingsLoader<VocupSettings> loader = new(directory, basename);
18-
VersionedSettings<VocupSettings> settings = await loader.LoadAsync().ConfigureAwait(false);
18+
VersionedSettings<VocupSettings> settings = await loader.LoadAsync();
1919

2020
settings.Value.StartupCounter++;
2121
await settings.DisposeAsync();

tests/Vocup.UnitTests/Vocup.UnitTests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<TargetPlatformMinVersion>10.0.10240.0</TargetPlatformMinVersion>
55
</PropertyGroup>
66
<ItemGroup>
7-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
7+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
88
<PackageReference Include="xunit" Version="2.9.2" />
99
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
1010
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>

0 commit comments

Comments
 (0)