Benedikt Stebner
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with
64 additions and
21 deletions
-
build/SourceLink.props
-
packages/Avalonia/Avalonia.csproj
-
src/Avalonia.Base/Avalonia.Base.csproj
-
src/Avalonia.Controls/Platform/DefaultMenuInteractionHandler.cs
-
src/Avalonia.Dialogs/AboutAvaloniaDialog.xaml
-
src/Avalonia.Dialogs/AboutAvaloniaDialog.xaml.cs
-
src/Avalonia.Themes.Default/CaptionButtons.xaml
-
src/Avalonia.Themes.Fluent/Controls/CaptionButtons.xaml
-
src/Shared/PlatformSupport/StandardRuntimePlatform.cs
|
|
|
@ -1,5 +1,26 @@ |
|
|
|
<Project> |
|
|
|
<PropertyGroup> |
|
|
|
<PublishRepositoryUrl>true</PublishRepositoryUrl> |
|
|
|
<IncludeSymbols>false</IncludeSymbols> |
|
|
|
<EmbedUntrackedSources>true</EmbedUntrackedSources> |
|
|
|
<DebugType>embedded</DebugType> |
|
|
|
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder> |
|
|
|
</PropertyGroup> |
|
|
|
|
|
|
|
<PropertyGroup Condition="'$(TF_BUILD)' == 'true'"> |
|
|
|
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild> |
|
|
|
</PropertyGroup> |
|
|
|
|
|
|
|
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'"> |
|
|
|
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild> |
|
|
|
</PropertyGroup> |
|
|
|
|
|
|
|
<ItemGroup> |
|
|
|
<PackageReference Include="SourceLink.Create.CommandLine" Version="2.8.3" PrivateAssets="All" /> |
|
|
|
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All"/> |
|
|
|
</ItemGroup> |
|
|
|
|
|
|
|
<!-- Workaround for https://github.com/dotnet/sdk/issues/11105 --> |
|
|
|
<ItemGroup> |
|
|
|
<SourceRoot Include="$(NuGetPackageRoot)" Condition="'$(NuGetPackageRoot)' != ''" /> |
|
|
|
</ItemGroup> |
|
|
|
</Project> |
|
|
|
|
|
|
|
@ -6,7 +6,9 @@ |
|
|
|
|
|
|
|
<ItemGroup> |
|
|
|
<ProjectReference Include="../../src/Avalonia.Remote.Protocol/Avalonia.Remote.Protocol.csproj" /> |
|
|
|
<ProjectReference Include="../../src/Avalonia.Build.Tasks/Avalonia.Build.Tasks.csproj" /> |
|
|
|
<ProjectReference Include="../../src/Avalonia.Build.Tasks/Avalonia.Build.Tasks.csproj" > |
|
|
|
<PrivateAssets>all</PrivateAssets> |
|
|
|
</ProjectReference> |
|
|
|
</ItemGroup> |
|
|
|
|
|
|
|
<PropertyGroup> |
|
|
|
@ -29,21 +31,23 @@ |
|
|
|
</_PackageFiles> |
|
|
|
</ItemGroup> |
|
|
|
</Target> |
|
|
|
|
|
|
|
<ItemGroup> |
|
|
|
<Content Include="*.props"> |
|
|
|
<Pack>true</Pack> |
|
|
|
<PackagePath>build\</PackagePath> |
|
|
|
<PackagePath>build\;buildTransitive\</PackagePath> |
|
|
|
</Content> |
|
|
|
<Content Include="*.targets"> |
|
|
|
<Pack>true</Pack> |
|
|
|
<PackagePath>build\</PackagePath> |
|
|
|
<PackagePath>build\;buildTransitive\</PackagePath> |
|
|
|
</Content> |
|
|
|
<Content Include="AvaloniaItemSchema.xaml"> |
|
|
|
<Pack>true</Pack> |
|
|
|
<PackagePath>build\</PackagePath> |
|
|
|
<PackagePath>build\;buildTransitive\</PackagePath> |
|
|
|
</Content> |
|
|
|
</ItemGroup> |
|
|
|
<Import Project="..\..\build\SharedVersion.props" /> |
|
|
|
<Import Project="..\..\build\NetFX.props" /> |
|
|
|
<Import Project="..\..\build\CoreLibraries.props" /> |
|
|
|
<Import Project="..\..\build\SourceLink.props" Condition="'$(DisableSourceLink)' == ''" /> |
|
|
|
</Project> |
|
|
|
|
|
|
|
@ -5,9 +5,6 @@ |
|
|
|
<RootNamespace>Avalonia</RootNamespace> |
|
|
|
<AllowUnsafeBlocks>True</AllowUnsafeBlocks> |
|
|
|
</PropertyGroup> |
|
|
|
<ItemGroup> |
|
|
|
<ProjectReference Include="..\Avalonia.Build.Tasks\Avalonia.Build.Tasks.csproj"/> |
|
|
|
</ItemGroup> |
|
|
|
<Import Project="..\..\build\Base.props" /> |
|
|
|
<Import Project="..\..\build\Binding.props" /> |
|
|
|
<Import Project="..\..\build\Rx.props" /> |
|
|
|
|
|
|
|
@ -355,7 +355,13 @@ namespace Avalonia.Controls.Platform |
|
|
|
} |
|
|
|
else if (!item.IsPointerOverSubMenu) |
|
|
|
{ |
|
|
|
item.IsSubMenuOpen = false; |
|
|
|
DelayRun(() => |
|
|
|
{ |
|
|
|
if (!item.IsPointerOverSubMenu) |
|
|
|
{ |
|
|
|
item.IsSubMenuOpen = false; |
|
|
|
} |
|
|
|
}, MenuShowDelay); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -79,8 +79,8 @@ |
|
|
|
<DrawingPresenter Drawing="{DynamicResource AvaloniaLogo}" /> |
|
|
|
</Border> |
|
|
|
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Margin="10,-10,0,0"> |
|
|
|
<TextBlock Text="Avalonia 0.9" FontSize="40" Foreground="White" /> |
|
|
|
<TextBlock Text="Development Build" Margin="0,-10,0,0" FontSize="15" Foreground="White" /> |
|
|
|
<TextBlock Text="{Binding Version, StringFormat=Avalonia {0}}" FontSize="40" Foreground="White" /> |
|
|
|
<TextBlock Text="Development Build" IsVisible="{Binding IsDevelopmentBuild}" Margin="0,-10,0,0" FontSize="15" Foreground="White" /> |
|
|
|
</StackPanel> |
|
|
|
</StackPanel> |
|
|
|
<StackPanel HorizontalAlignment="Stretch" VerticalAlignment="Center" Spacing="20" Margin="10 60 10 0"> |
|
|
|
@ -102,4 +102,4 @@ |
|
|
|
<TextBlock Text="© 2020 The Avalonia Project" TextWrapping="Wrap" HorizontalAlignment="Center" /> |
|
|
|
</StackPanel> |
|
|
|
</Grid> |
|
|
|
</Window> |
|
|
|
</Window> |
|
|
|
|
|
|
|
@ -1,3 +1,4 @@ |
|
|
|
using System; |
|
|
|
using System.Diagnostics; |
|
|
|
using System.Runtime.InteropServices; |
|
|
|
using Avalonia.Controls; |
|
|
|
@ -7,12 +8,18 @@ namespace Avalonia.Dialogs |
|
|
|
{ |
|
|
|
public class AboutAvaloniaDialog : Window |
|
|
|
{ |
|
|
|
private static readonly Version s_version = typeof(AboutAvaloniaDialog).Assembly.GetName().Version; |
|
|
|
|
|
|
|
public static string Version { get; } = s_version.ToString(2); |
|
|
|
|
|
|
|
public static bool IsDevelopmentBuild { get; } = s_version.Revision == 999; |
|
|
|
|
|
|
|
public AboutAvaloniaDialog() |
|
|
|
{ |
|
|
|
AvaloniaXamlLoader.Load(this); |
|
|
|
DataContext = this; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static void OpenBrowser(string url) |
|
|
|
{ |
|
|
|
if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) |
|
|
|
|
|
|
|
@ -57,7 +57,7 @@ |
|
|
|
<Style Selector="CaptionButtons:maximized Panel#PART_RestoreButton Path"> |
|
|
|
<Setter Property="Data" Value="M2048 410h-410v-410h-1638v1638h410v410h1638v-1638zM1434 1434h-1229v-1229h1229v1229zM1843 1843h-1229v-205h1024v-1024h205v1229z" /> |
|
|
|
</Style> |
|
|
|
<Style Selector="CaptionButtons Panel#PART_FullScreenButton Path"> |
|
|
|
<Style Selector="CaptionButtons Panel#PART_FullScreenButton"> |
|
|
|
<Setter Property="IsVisible" Value="False" /> |
|
|
|
</Style> |
|
|
|
<Style Selector="CaptionButtons Panel#PART_FullScreenButton Path"> |
|
|
|
|
|
|
|
@ -56,7 +56,7 @@ |
|
|
|
<Style Selector="CaptionButtons:maximized Panel#PART_RestoreButton Path"> |
|
|
|
<Setter Property="Data" Value="M2048 410h-410v-410h-1638v1638h410v410h1638v-1638zM1434 1434h-1229v-1229h1229v1229zM1843 1843h-1229v-205h1024v-1024h205v1229z" /> |
|
|
|
</Style> |
|
|
|
<Style Selector="CaptionButtons Panel#PART_FullScreenButton Path"> |
|
|
|
<Style Selector="CaptionButtons Panel#PART_FullScreenButton"> |
|
|
|
<Setter Property="IsVisible" Value="False" /> |
|
|
|
</Style> |
|
|
|
<Style Selector="CaptionButtons Panel#PART_FullScreenButton Path"> |
|
|
|
|
|
|
|
@ -49,12 +49,20 @@ namespace Avalonia.Shared.PlatformSupport |
|
|
|
|
|
|
|
public UnmanagedBlob(StandardRuntimePlatform plat, int size) |
|
|
|
{ |
|
|
|
if (size <= 0) |
|
|
|
throw new ArgumentException("Positive number required", nameof(size)); |
|
|
|
_plat = plat; |
|
|
|
_address = plat.Alloc(size); |
|
|
|
GC.AddMemoryPressure(size); |
|
|
|
Size = size; |
|
|
|
try |
|
|
|
{ |
|
|
|
if (size <= 0) |
|
|
|
throw new ArgumentException("Positive number required", nameof(size)); |
|
|
|
_plat = plat; |
|
|
|
_address = plat.Alloc(size); |
|
|
|
GC.AddMemoryPressure(size); |
|
|
|
Size = size; |
|
|
|
} |
|
|
|
catch |
|
|
|
{ |
|
|
|
GC.SuppressFinalize(this); |
|
|
|
throw; |
|
|
|
} |
|
|
|
#if DEBUG
|
|
|
|
_backtrace = Environment.StackTrace; |
|
|
|
lock (_btlock) |
|
|
|
|