Skip to content

Commit 7535b91

Browse files
authored
fix: Rollback incorrect high DPI calculations; format code; add manifest for .NET tools (#1449)
* chore: Format code and add tools manifest * fix: Rollback incorrect position for high DPI after #1373
1 parent f7ad441 commit 7535b91

File tree

31 files changed

+119
-119
lines changed

31 files changed

+119
-119
lines changed

.config/dotnet-tools.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"version": 1,
3+
"isRoot": true,
4+
"tools": {
5+
"csharpier": {
6+
"version": "1.0.1",
7+
"commands": [
8+
"csharpier"
9+
],
10+
"rollForward": false
11+
}
12+
}
13+
}

.csharpierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.csproj

Directory.Build.props

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
<Project>
2-
32
<PropertyGroup>
43
<RepositoryDirectory>$(MSBuildThisFileDirectory)</RepositoryDirectory>
54
<BuildToolsDirectory>$(RepositoryDirectory)build\</BuildToolsDirectory>
65
</PropertyGroup>
7-
86
<PropertyGroup>
9-
<Version>4.0.2</Version>
7+
<Version>4.0.3</Version>
108
<AssemblyVersion>4.0.0</AssemblyVersion>
119
</PropertyGroup>
12-
1310
<PropertyGroup>
1411
<Company>lepo.co</Company>
1512
<Authors>lepo.co</Authors>
@@ -25,11 +22,9 @@
2522
<RepositoryBranch>main</RepositoryBranch>
2623
<RepositoryType>git</RepositoryType>
2724
</PropertyGroup>
28-
2925
<ItemGroup>
30-
<SourceRoot Include="$(MSBuildThisFileDirectory)/"/>
26+
<SourceRoot Include="$(MSBuildThisFileDirectory)/" />
3127
</ItemGroup>
32-
3328
<PropertyGroup>
3429
<NuGetAudit>true</NuGetAudit>
3530
<NuGetAuditLevel>moderate</NuGetAuditLevel>
@@ -38,48 +33,44 @@
3833
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
3934
<_SilenceIsAotCompatibleUnsupportedWarning>true</_SilenceIsAotCompatibleUnsupportedWarning>
4035
</PropertyGroup>
41-
4236
<PropertyGroup>
4337
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
4438
</PropertyGroup>
45-
4639
<PropertyGroup>
4740
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
4841
<LangVersion>13.0</LangVersion>
4942
<Nullable>enable</Nullable>
50-
5143
<!--
5244
Suppress ref safety warnings in unsafe contexts (see https://github.com/dotnet/csharplang/issues/6476).
5345
This is used eg. to replace Unsafe.SizeOf<T>() calls with just sizeof(T). The warning is not necessary
5446
since in order to use these APIs the caller already has to be in an unsafe context.
5547
-->
5648
<NoWarn>$(NoWarn);CS8500</NoWarn>
5749
</PropertyGroup>
58-
5950
<PropertyGroup>
6051
<IsTestProject>$(MSBuildProjectName.Contains('Test'))</IsTestProject>
6152
<IsCoreProject Condition="$(IsTestProject)">False</IsCoreProject>
6253
<IsCoreProject Condition="'$(IsCoreProject)' == ''">True</IsCoreProject>
63-
<IsBelowNet8 Condition="'$(TargetFramework)' == 'netstandard2.0'
54+
<IsBelowNet8
55+
Condition="'$(TargetFramework)' == 'netstandard2.0'
6456
Or '$(TargetFramework)' == 'netstandard2.1'
6557
Or '$(TargetFramework)' == 'net462'
6658
Or '$(TargetFramework)' == 'net472'
6759
Or '$(TargetFramework)' == 'net481'
6860
Or '$(TargetFramework)' == 'net5.0'
6961
Or '$(TargetFramework)' == 'net6.0'
70-
Or '$(TargetFramework)' == 'net7.0'">True</IsBelowNet8>
62+
Or '$(TargetFramework)' == 'net7.0'"
63+
>True</IsBelowNet8
64+
>
7165
</PropertyGroup>
72-
7366
<PropertyGroup>
7467
<IsPackable>true</IsPackable>
7568
<IsPublishable>true</IsPublishable>
7669
<ContinuousIntegrationBuild>$(TF_BUILD)</ContinuousIntegrationBuild>
7770
</PropertyGroup>
78-
7971
<PropertyGroup Condition="'$(IsBelowNet8)' == 'false'">
8072
<DefineConstants>$(DefineConstants);NET8_0_OR_GREATER</DefineConstants>
8173
</PropertyGroup>
82-
8374
<Choose>
8475
<When Condition="$(IsCoreProject)">
8576
<PropertyGroup>
@@ -95,7 +86,6 @@
9586
</PropertyGroup>
9687
</Otherwise>
9788
</Choose>
98-
9989
<Choose>
10090
<When Condition="'$(SourceLinkEnabled)' != 'false' and '$(VisualStudioTemplateProject)' != 'true'">
10191
<PropertyGroup>
@@ -111,5 +101,4 @@
111101
</ItemGroup>
112102
</When>
113103
</Choose>
114-
115-
</Project>
104+
</Project>

Directory.Build.targets

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
<Project>
2-
32
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
43
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
54
</PropertyGroup>
6-
75
<PropertyGroup>
86
<CommonTags Condition="$(IsCoreProject)">$(CommonTags);.NET</CommonTags>
97
<PackageTags Condition="'$(PackageTags)' != ''">$(CommonTags);$(PackageTags)</PackageTags>
108
<PackageTags Condition="'$(PackageTags)' == ''">$(CommonTags)</PackageTags>
119
</PropertyGroup>
12-
1310
<PropertyGroup Condition="'$(GeneratePackageOnBuild)' == 'true'">
1411
<GenerateLibraryLayout>true</GenerateLibraryLayout>
1512
<PackageReadmeFile>README.md</PackageReadmeFile>
@@ -19,37 +16,39 @@
1916
<PublishRepositoryUrl>true</PublishRepositoryUrl>
2017
<EmbedUntrackedSources>true</EmbedUntrackedSources>
2118
</PropertyGroup>
22-
2319
<ItemGroup Condition="'$(GeneratePackageOnBuild)' == 'true'">
2420
<None Include="$(BuildToolsDirectory)nuget.png" Pack="true" PackagePath="\Icon.png" Visible="False" />
2521
<None Include="$(RepositoryDirectory)ThirdPartyNotices.txt" Pack="true" PackagePath="\" Visible="False" />
2622
<None Include="$(RepositoryDirectory)LICENSE.md" Pack="true" PackagePath="\LICENSE.md" Visible="False" />
2723
<None Include="$(RepositoryDirectory)README.md" Pack="true" PackagePath="\README.md" Visible="False" />
2824
</ItemGroup>
29-
3025
<Target Name="AddCommitHashToAssemblyAttributes" BeforeTargets="GetAssemblyAttributes">
3126
<ItemGroup>
32-
<AssemblyAttribute Include="System.Reflection.AssemblyMetadataAttribute" Condition="'$(SourceRevisionId)' != ''">
27+
<AssemblyAttribute
28+
Include="System.Reflection.AssemblyMetadataAttribute"
29+
Condition="'$(SourceRevisionId)' != ''"
30+
>
3331
<_Parameter1>CommitHash</_Parameter1>
3432
<_Parameter2>$(SourceRevisionId)</_Parameter2>
3533
</AssemblyAttribute>
3634
</ItemGroup>
3735
</Target>
38-
3936
<!-- Configure trimming for projects on .NET 6 and above -->
4037
<PropertyGroup Condition="'$(TargetFramework)' == 'net6.0' OR '$(TargetFramework)' == 'net7.0' OR '$(TargetFramework)' == 'net8.0' OR '$(TargetFramework)' == 'net9.0' OR '$(TargetFramework)' == 'net10.0'">
4138
<IsTrimmable>true</IsTrimmable>
4239
<EnableTrimAnalyzer>true</EnableTrimAnalyzer>
4340
<EnableAotAnalyzer>true</EnableAotAnalyzer>
4441
<EnableSingleFileAnalyzer>true</EnableSingleFileAnalyzer>
4542
</PropertyGroup>
46-
4743
<PropertyGroup Condition="'$(SourceLinkEnabled)' == 'true' AND '$(GeneratePackageOnBuild)' == 'true'">
4844
<SignAssembly>true</SignAssembly>
4945
<AssemblyOriginatorKeyFile>$(RepositoryDirectory)\src\lepo.snk</AssemblyOriginatorKeyFile>
5046
</PropertyGroup>
51-
52-
<Target Name="WpfSourceLinkWorkaround" BeforeTargets="InitializeSourceRootMappedPaths" Condition="'$(UseWPF)' == 'true'">
47+
<Target
48+
Name="WpfSourceLinkWorkaround"
49+
BeforeTargets="InitializeSourceRootMappedPaths"
50+
Condition="'$(UseWPF)' == 'true'"
51+
>
5352
<!-- WPF causes an error with SourceLink because its build targets create a temporary project without a PackageReference to SourceLink, see https://github.com/dotnet/sourcelink/issues/91,
5453
causing the @SourceRoot property to be unexpectedly empty for the MapSourceRoot task
5554
@@ -63,4 +62,4 @@
6362
<SourceRoot Include="\" />
6463
</ItemGroup>
6564
</Target>
66-
</Project>
65+
</Project>

Directory.Packages.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@
2727
<PackageVersion Include="xunit.runner.visualstudio" Version="3.0.1" />
2828
<PackageVersion Include="xunit" Version="2.9.3" />
2929
</ItemGroup>
30-
</Project>
30+
</Project>

nuget.config

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,10 @@
33
<add key="enabled" value="True" />
44
<add key="automatic" value="True" />
55
</packageRestore>
6-
76
<packageSources>
87
<clear />
98
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
109
</packageSources>
11-
1210
<packageSourceMapping>
1311
<packageSource key="nuget.org">
1412
<package pattern="*" />

samples/Wpf.Ui.Demo.SetResources.Simple/App.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ public static void ApplyTheme(FrameworkElement element)
2727
element.Resources.MergedDictionaries.Add(ThemesDictionary);
2828
element.Resources.MergedDictionaries.Add(ControlsDictionary);
2929
}
30-
}
30+
}

samples/Wpf.Ui.Demo.SetResources.Simple/MainWindow.xaml.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ public partial class MainWindow
1818
public MainWindow()
1919
{
2020
DataContext = this;
21-
21+
2222
App.ApplyTheme(this);
23-
23+
2424
InitializeComponent();
2525

2626
Loaded += (_, _) => RootNavigation.Navigate(typeof(DashboardPage));

samples/Wpf.Ui.Demo.SetResources.Simple/Models/DataGroup.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ public DataGroup(bool selected, string name, string groupName)
1717
public bool Selected { get; set; }
1818
public string Name { get; set; }
1919
public string GroupName { get; set; }
20-
}
20+
}

samples/Wpf.Ui.Demo.SetResources.Simple/Views/Pages/DashboardPage.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public partial class DashboardPage
1717
public DashboardPage()
1818
{
1919
App.ApplyTheme(this);
20-
20+
2121
DataContext = this;
2222
InitializeComponent();
2323

0 commit comments

Comments
 (0)