Browse Source

fix more nits.

pull/3967/head
Dan Walmsley 6 years ago
parent
commit
a8aff643f0
  1. 2
      samples/ControlCatalog/MainWindow.xaml
  2. 2
      samples/ControlCatalog/Pages/WindowCustomizationsPage.xaml
  3. 4
      src/Avalonia.Controls/Window.cs
  4. 4
      src/Avalonia.Native/WindowImpl.cs
  5. 2
      src/Avalonia.Native/WindowImplBase.cs
  6. 3
      src/Avalonia.Themes.Default/CaptionButtons.xaml
  7. 3
      src/Avalonia.Themes.Fluent/CaptionButtons.xaml
  8. 2
      src/Windows/Avalonia.Win32/WindowImpl.AppWndProc.cs

2
samples/ControlCatalog/MainWindow.xaml

@ -84,7 +84,7 @@
<Border.Background>
<SolidColorBrush Color="White" Opacity="0.7" />
</Border.Background>
<TextBlock Margin="5 5 5 0" Text="Content In TitleBar" />
<TextBlock Margin="5 5 5 0" Text="Content In Title Bar" />
</Border>
</Panel>
</Window>

2
samples/ControlCatalog/Pages/WindowCustomizationsPage.xaml

@ -6,7 +6,7 @@
x:Class="ControlCatalog.Pages.WindowCustomizationsPage">
<StackPanel Spacing="10" Margin="25">
<CheckBox Content="Extend Client Area to Decorations" IsChecked="{Binding ExtendClientAreaEnabled}" />
<CheckBox Content="Titlebar" IsChecked="{Binding SystemTitleBarEnabled}" />
<CheckBox Content="Title Bar" IsChecked="{Binding SystemTitleBarEnabled}" />
<CheckBox Content="Prefer System Chrome" IsChecked="{Binding PreferSystemChromeEnabled}" />
<Slider Minimum="-1" Maximum="200" Value="{Binding TitleBarHeight}" />
<ComboBox x:Name="TransparencyLevels" SelectedIndex="{Binding TransparencyLevel}">

4
src/Avalonia.Controls/Window.cs

@ -104,7 +104,6 @@ namespace Avalonia.Controls
public static readonly StyledProperty<double> ExtendClientAreaTitleBarHeightHintProperty =
AvaloniaProperty.Register<Window, double>(nameof(ExtendClientAreaTitleBarHeightHint), -1);
/// <summary>
/// Defines the <see cref="IsExtendedIntoWindowDecorations"/> property.
/// </summary>
@ -124,7 +123,6 @@ namespace Avalonia.Controls
AvaloniaProperty.RegisterDirect<Window, Thickness>(nameof(OffScreenMargin),
o => o.OffScreenMargin);
/// <summary>
/// Defines the <see cref="SystemDecorations"/> property.
/// </summary>
@ -534,9 +532,7 @@ namespace Avalonia.Controls
protected virtual void ExtendClientAreaToDecorationsChanged(bool isExtended)
{
IsExtendedIntoWindowDecorations = isExtended;
WindowDecorationMargins = PlatformImpl.ExtendedMargins;
OffScreenMargin = PlatformImpl.OffScreenMargin;
if (PlatformImpl.NeedsManagedDecorations)

4
src/Avalonia.Native/WindowImpl.cs

@ -138,9 +138,9 @@ namespace Avalonia.Native
return false;
}
private void InvalidateExtendedMargins ()
private void InvalidateExtendedMargins()
{
if(WindowState == WindowState.FullScreen)
if (WindowState == WindowState.FullScreen)
{
ExtendedMargins = new Thickness();
}

2
src/Avalonia.Native/WindowImplBase.cs

@ -266,7 +266,7 @@ namespace Avalonia.Native
return args.Handled;
}
protected virtual bool ChromeHitTest (RawPointerEventArgs e)
protected virtual bool ChromeHitTest(RawPointerEventArgs e)
{
return false;
}

3
src/Avalonia.Themes.Default/CaptionButtons.xaml

@ -1,7 +1,6 @@
<Styles xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Style Selector="CaptionButtons">
<Setter Property="Foreground" Value="{DynamicResource ThemeForegroundBrush}"/>
<Setter Property="Canvas.Right" Value="0" />
<Setter Property="Foreground" Value="{DynamicResource ThemeForegroundBrush}"/>
<Setter Property="MaxHeight" Value="30" />
<Setter Property="Template">
<ControlTemplate>

3
src/Avalonia.Themes.Fluent/CaptionButtons.xaml

@ -1,7 +1,6 @@
<Styles xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Style Selector="CaptionButtons">
<Setter Property="Foreground" Value="{DynamicResource ThemeForegroundBrush}"/>
<Setter Property="Canvas.Right" Value="0" />
<Setter Property="Foreground" Value="{DynamicResource ThemeForegroundBrush}"/>
<Setter Property="MaxHeight" Value="30" />
<Setter Property="Template">
<ControlTemplate>

2
src/Windows/Avalonia.Win32/WindowImpl.AppWndProc.cs

@ -377,7 +377,7 @@ namespace Avalonia.Win32
if (windowState != _lastWindowState)
{
_lastWindowState = windowState;
_lastWindowState = windowState;
WindowStateChanged?.Invoke(windowState);

Loading…
Cancel
Save