Browse Source
Merge branch 'master' into 0x90d-patch-1
pull/6616/head
Steven Kirk
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with
64 additions and
6 deletions
-
packages/Avalonia/AvaloniaBuildTasks.targets
-
src/Avalonia.Controls/Design.cs
-
src/Avalonia.Themes.Fluent/Controls/NotificationCard.xaml
-
src/Avalonia.Themes.Fluent/Controls/ProgressBar.xaml
-
src/Windows/Avalonia.Win32/Interop/UnmanagedMethods.cs
-
src/Windows/Avalonia.Win32/WindowImpl.AppWndProc.cs
|
|
|
@ -42,12 +42,24 @@ |
|
|
|
</Target> |
|
|
|
|
|
|
|
<PropertyGroup> |
|
|
|
<BuildAvaloniaResourcesDependsOn>$(BuildAvaloniaResourcesDependsOn);AddAvaloniaResources;ResolveReferences</BuildAvaloniaResourcesDependsOn> |
|
|
|
<BuildAvaloniaResourcesDependsOn>$(BuildAvaloniaResourcesDependsOn);AddAvaloniaResources;ResolveReferences;_GenerateAvaloniaResourcesDependencyCache</BuildAvaloniaResourcesDependsOn> |
|
|
|
</PropertyGroup> |
|
|
|
|
|
|
|
<Target Name="_GenerateAvaloniaResourcesDependencyCache" BeforeTargets="GenerateAvaloniaResources"> |
|
|
|
<ItemGroup> |
|
|
|
<CustomAdditionalGenerateAvaloniaResourcesInputs Include="$(IntermediateOutputPath)/Avalonia/Resources.Inputs.cache" /> |
|
|
|
</ItemGroup> |
|
|
|
|
|
|
|
<Hash ItemsToHash="@(AvaloniaResource);@(AvaloniaXaml);$(MSBuildAllProjects)"> |
|
|
|
<Output TaskParameter="HashResult" PropertyName="AvaloniaResourcesDependencyHash" /> |
|
|
|
</Hash> |
|
|
|
|
|
|
|
<WriteLinesToFile Overwrite="true" File="$(IntermediateOutputPath)/Avalonia/Resources.Inputs.cache" Lines="$(AvaloniaResourcesDependencyHash)" WriteOnlyWhenDifferent="True" /> |
|
|
|
</Target> |
|
|
|
|
|
|
|
<Target Name="GenerateAvaloniaResources" |
|
|
|
BeforeTargets="CoreCompile;CoreResGen" |
|
|
|
Inputs="@(AvaloniaResource);@(AvaloniaXaml);$(MSBuildAllProjects)" |
|
|
|
Inputs="@(AvaloniaResource);@(AvaloniaXaml);@(CustomAdditionalGenerateAvaloniaResourcesInputs);$(MSBuildAllProjects)" |
|
|
|
Outputs="$(AvaloniaResourcesTemporaryFilePath)" |
|
|
|
DependsOnTargets="$(BuildAvaloniaResourcesDependsOn)"> |
|
|
|
<ItemGroup> |
|
|
|
|
|
|
|
@ -60,6 +60,19 @@ namespace Avalonia.Controls |
|
|
|
return target.GetValue(PreviewWithProperty); |
|
|
|
} |
|
|
|
|
|
|
|
public static readonly AttachedProperty<IStyle> DesignStyleProperty = AvaloniaProperty |
|
|
|
.RegisterAttached<Control, IStyle>("DesignStyle", typeof(Design)); |
|
|
|
|
|
|
|
public static void SetDesignStyle(Control control, IStyle value) |
|
|
|
{ |
|
|
|
control.SetValue(DesignStyleProperty, value); |
|
|
|
} |
|
|
|
|
|
|
|
public static IStyle GetDesignStyle(Control control) |
|
|
|
{ |
|
|
|
return control.GetValue(DesignStyleProperty); |
|
|
|
} |
|
|
|
|
|
|
|
public static void ApplyDesignModeProperties(Control target, Control source) |
|
|
|
{ |
|
|
|
if (source.IsSet(WidthProperty)) |
|
|
|
@ -68,6 +81,8 @@ namespace Avalonia.Controls |
|
|
|
target.Height = source.GetValue(HeightProperty); |
|
|
|
if (source.IsSet(DataContextProperty)) |
|
|
|
target.DataContext = source.GetValue(DataContextProperty); |
|
|
|
if (source.IsSet(DesignStyleProperty)) |
|
|
|
target.Styles.Add(source.GetValue(DesignStyleProperty)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -17,7 +17,7 @@ |
|
|
|
<Setter Property="Template"> |
|
|
|
<ControlTemplate> |
|
|
|
<LayoutTransformControl Name="PART_LayoutTransformControl" UseRenderTransform="True"> |
|
|
|
<Border CornerRadius="{DynamicResource ControlCornerRadius}" BoxShadow="0 6 8 0 #4F000000" Margin="5 5 5 10"> |
|
|
|
<Border CornerRadius="{TemplateBinding CornerRadius}" BoxShadow="0 6 8 0 #4F000000" Margin="5 5 5 10"> |
|
|
|
<Border Background="{TemplateBinding Background}" |
|
|
|
BorderBrush="{TemplateBinding BorderBrush}" |
|
|
|
BorderThickness="{TemplateBinding BorderThickness}" |
|
|
|
|
|
|
|
@ -23,11 +23,11 @@ |
|
|
|
<Border x:Name="ProgressBarRoot" ClipToBounds="True" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding CornerRadius}"> |
|
|
|
<Panel> |
|
|
|
<Panel x:Name="DeterminateRoot"> |
|
|
|
<Border CornerRadius="{DynamicResource ControlCornerRadius}" x:Name="PART_Indicator" Margin="{TemplateBinding Padding}" Background="{TemplateBinding Foreground}" /> |
|
|
|
<Border CornerRadius="{TemplateBinding CornerRadius}" x:Name="PART_Indicator" Margin="{TemplateBinding Padding}" Background="{TemplateBinding Foreground}" /> |
|
|
|
</Panel> |
|
|
|
<Panel x:Name="IndeterminateRoot"> |
|
|
|
<Border x:Name="IndeterminateProgressBarIndicator" CornerRadius="{DynamicResource ControlCornerRadius}" Margin="{TemplateBinding Padding}" Background="{TemplateBinding Foreground}" /> |
|
|
|
<Border x:Name="IndeterminateProgressBarIndicator2" CornerRadius="{DynamicResource ControlCornerRadius}" Margin="{TemplateBinding Padding}" Background="{TemplateBinding Foreground}" /> |
|
|
|
<Border x:Name="IndeterminateProgressBarIndicator" CornerRadius="{TemplateBinding CornerRadius}" Margin="{TemplateBinding Padding}" Background="{TemplateBinding Foreground}" /> |
|
|
|
<Border x:Name="IndeterminateProgressBarIndicator2" CornerRadius="{TemplateBinding CornerRadius}" Margin="{TemplateBinding Padding}" Background="{TemplateBinding Foreground}" /> |
|
|
|
</Panel> |
|
|
|
</Panel> |
|
|
|
</Border> |
|
|
|
|
|
|
|
@ -808,6 +808,31 @@ namespace Avalonia.Win32.Interop |
|
|
|
MNC_SELECT = 3 |
|
|
|
} |
|
|
|
|
|
|
|
public enum SysCommands |
|
|
|
{ |
|
|
|
SC_SIZE = 0xF000, |
|
|
|
SC_MOVE = 0xF010, |
|
|
|
SC_MINIMIZE = 0xF020, |
|
|
|
SC_MAXIMIZE = 0xF030, |
|
|
|
SC_NEXTWINDOW = 0xF040, |
|
|
|
SC_PREVWINDOW = 0xF050, |
|
|
|
SC_CLOSE = 0xF060, |
|
|
|
SC_VSCROLL = 0xF070, |
|
|
|
SC_HSCROLL = 0xF080, |
|
|
|
SC_MOUSEMENU = 0xF090, |
|
|
|
SC_KEYMENU = 0xF100, |
|
|
|
SC_ARRANGE = 0xF110, |
|
|
|
SC_RESTORE = 0xF120, |
|
|
|
SC_TASKLIST = 0xF130, |
|
|
|
SC_SCREENSAVE = 0xF140, |
|
|
|
SC_HOTKEY = 0xF150, |
|
|
|
SC_DEFAULT = 0xF160, |
|
|
|
SC_MONITORPOWER = 0xF170, |
|
|
|
SC_CONTEXTHELP = 0xF180, |
|
|
|
SC_SEPARATOR = 0xF00F, |
|
|
|
SCF_ISSECURE = 0x00000001, |
|
|
|
} |
|
|
|
|
|
|
|
[StructLayout(LayoutKind.Sequential)] |
|
|
|
public struct RGBQUAD |
|
|
|
{ |
|
|
|
|
|
|
|
@ -123,6 +123,12 @@ namespace Avalonia.Win32 |
|
|
|
break; |
|
|
|
} |
|
|
|
|
|
|
|
case WindowsMessage.WM_SYSCOMMAND: |
|
|
|
// Disable system handling of Alt/F10 menu keys.
|
|
|
|
if ((SysCommands)wParam == SysCommands.SC_KEYMENU && HighWord(ToInt32(lParam)) <= 0) |
|
|
|
return IntPtr.Zero; |
|
|
|
break; |
|
|
|
|
|
|
|
case WindowsMessage.WM_MENUCHAR: |
|
|
|
{ |
|
|
|
// mute the system beep
|
|
|
|
|