Browse Source
Merge branch 'master' into features/NetAnalyzers/CA1847
pull/9190/head
Max Katz
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with
13 additions and
9 deletions
-
src/Avalonia.Diagnostics/Diagnostics/Views/MainWindow.xaml
-
src/Avalonia.Diagnostics/Diagnostics/Views/MainWindow.xaml.cs
-
src/Avalonia.Themes.Fluent/Controls/CaptionButtons.xaml
-
src/Avalonia.Themes.Simple/Controls/CaptionButtons.xaml
-
src/Markup/Avalonia.Markup.Xaml/MarkupExtensions/StaticResourceExtension.cs
|
|
|
@ -3,8 +3,7 @@ |
|
|
|
xmlns:views="clr-namespace:Avalonia.Diagnostics.Views" |
|
|
|
xmlns:diag="clr-namespace:Avalonia.Diagnostics" |
|
|
|
Title="Avalonia DevTools" |
|
|
|
x:Class="Avalonia.Diagnostics.Views.MainWindow" |
|
|
|
Theme="{StaticResource {x:Type Window}}"> |
|
|
|
x:Class="Avalonia.Diagnostics.Views.MainWindow"> |
|
|
|
<Window.DataTemplates> |
|
|
|
<diag:ViewLocator/> |
|
|
|
</Window.DataTemplates> |
|
|
|
|
|
|
|
@ -28,6 +28,11 @@ namespace Avalonia.Diagnostics.Views |
|
|
|
{ |
|
|
|
InitializeComponent(); |
|
|
|
|
|
|
|
// Apply the SimpleTheme.Window theme; this must be done after the XAML is parsed as
|
|
|
|
// the theme is included in the MainWindow's XAML.
|
|
|
|
if (Theme is null && this.FindResource(typeof(Window)) is ControlTheme windowTheme) |
|
|
|
Theme = windowTheme; |
|
|
|
|
|
|
|
_keySubscription = InputManager.Instance?.Process |
|
|
|
.OfType<RawKeyEventArgs>() |
|
|
|
.Where(x => x.Type == RawKeyEventType.KeyDown) |
|
|
|
|
|
|
|
@ -83,14 +83,14 @@ |
|
|
|
<Style Selector="^:maximized /template/ Path#RestoreButtonPath"> |
|
|
|
<Setter Property="Data" Value="M2048 410h-410v-410h-1638v1638h410v410h1638v-1638zM1434 1434h-1229v-1229h1229v1229zM1843 1843h-1229v-205h1024v-1024h205v1229z" /> |
|
|
|
</Style> |
|
|
|
<Style Selector="^:fullscreen /template/ Path#PART_FullScreenButtonPath"> |
|
|
|
<Style Selector="^:fullscreen /template/ Path#FullScreenButtonPath"> |
|
|
|
<Setter Property="IsVisible" Value="True" /> |
|
|
|
<Setter Property="Data" Value="M205 1024h819v-819h-205v469l-674 -674l-145 145l674 674h-469v205zM1374 1229h469v-205h-819v819h205v-469l674 674l145 -145z" /> |
|
|
|
</Style> |
|
|
|
<Style Selector="^:fullscreen /template/ Panel#PART_RestoreButton"> |
|
|
|
<Style Selector="^:fullscreen /template/ Button#PART_RestoreButton"> |
|
|
|
<Setter Property="IsVisible" Value="False" /> |
|
|
|
</Style> |
|
|
|
<Style Selector="^:fullscreen /template/ Panel#PART_MinimiseButton"> |
|
|
|
<Style Selector="^:fullscreen /template/ Button#PART_MinimiseButton"> |
|
|
|
<Setter Property="IsVisible" Value="False" /> |
|
|
|
</Style> |
|
|
|
</ControlTheme> |
|
|
|
|
|
|
|
@ -92,14 +92,14 @@ |
|
|
|
<Style Selector="^:maximized /template/ Path#RestoreButtonPath"> |
|
|
|
<Setter Property="Data" Value="M2048 410h-410v-410h-1638v1638h410v410h1638v-1638zM1434 1434h-1229v-1229h1229v1229zM1843 1843h-1229v-205h1024v-1024h205v1229z" /> |
|
|
|
</Style> |
|
|
|
<Style Selector="^:fullscreen /template/ Path#PART_FullScreenButtonPath"> |
|
|
|
<Style Selector="^:fullscreen /template/ Path#FullScreenButtonPath"> |
|
|
|
<Setter Property="IsVisible" Value="True" /> |
|
|
|
<Setter Property="Data" Value="M205 1024h819v-819h-205v469l-674 -674l-145 145l674 674h-469v205zM1374 1229h469v-205h-819v819h205v-469l674 674l145 -145z" /> |
|
|
|
</Style> |
|
|
|
<Style Selector="^:fullscreen /template/ Panel#PART_RestoreButton"> |
|
|
|
<Style Selector="^:fullscreen /template/ Button#PART_RestoreButton"> |
|
|
|
<Setter Property="IsVisible" Value="False" /> |
|
|
|
</Style> |
|
|
|
<Style Selector="^:fullscreen /template/ Panel#PART_MinimiseButton"> |
|
|
|
<Style Selector="^:fullscreen /template/ Button#PART_MinimiseButton"> |
|
|
|
<Setter Property="IsVisible" Value="False" /> |
|
|
|
</Style> |
|
|
|
</ControlTheme> |
|
|
|
|
|
|
|
@ -56,7 +56,7 @@ namespace Avalonia.Markup.Xaml.MarkupExtensions |
|
|
|
// We need to implement compile-time merging of resource dictionaries and this
|
|
|
|
// hack can be removed.
|
|
|
|
if (previousWasControlTheme && |
|
|
|
parent is ResourceDictionary hack && |
|
|
|
parent is IResourceProvider hack && |
|
|
|
hack.Owner?.GetType().FullName == "Avalonia.Diagnostics.Views.MainWindow" && |
|
|
|
hack.Owner.TryGetResource(ResourceKey, out value)) |
|
|
|
{ |
|
|
|
|