Browse Source

Merge remote-tracking branch 'origin/master' into android-keyboard

pull/5735/head
ili 5 years ago
parent
commit
400b6a7af5
  1. 2
      readme.md
  2. 19
      src/Windows/Avalonia.Win32/WindowImpl.cs

2
readme.md

@ -2,8 +2,6 @@
<br /> <br />
[![NuGet](https://img.shields.io/nuget/v/Avalonia.svg)](https://www.nuget.org/packages/Avalonia) [![downloads](https://img.shields.io/nuget/dt/avalonia)](https://www.nuget.org/packages/Avalonia) [![MyGet](https://img.shields.io/myget/avalonia-ci/vpre/Avalonia.svg?label=myget)](https://www.myget.org/gallery/avalonia-ci) ![Size](https://img.shields.io/github/repo-size/avaloniaui/avalonia.svg) [![NuGet](https://img.shields.io/nuget/v/Avalonia.svg)](https://www.nuget.org/packages/Avalonia) [![downloads](https://img.shields.io/nuget/dt/avalonia)](https://www.nuget.org/packages/Avalonia) [![MyGet](https://img.shields.io/myget/avalonia-ci/vpre/Avalonia.svg?label=myget)](https://www.myget.org/gallery/avalonia-ci) ![Size](https://img.shields.io/github/repo-size/avaloniaui/avalonia.svg)
<img alt="Avalonia" src="https://user-images.githubusercontent.com/6759207/84897744-cab6d800-b0ae-11ea-8214-e5174d71f5c8.png" width="400"/>
## 📖 About AvaloniaUI ## 📖 About AvaloniaUI
Avalonia is a cross-platform XAML-based UI framework providing a flexible styling system and supporting a wide range of Operating Systems such as Windows via .NET Framework and .NET Core, Linux via Xorg, macOS. Avalonia is ready for **General-Purpose Desktop App Development**. However, there may be some bugs and breaking changes as we continue along into this project's development. Avalonia is a cross-platform XAML-based UI framework providing a flexible styling system and supporting a wide range of Operating Systems such as Windows via .NET Framework and .NET Core, Linux via Xorg, macOS. Avalonia is ready for **General-Purpose Desktop App Development**. However, there may be some bugs and breaking changes as we continue along into this project's development.

19
src/Windows/Avalonia.Win32/WindowImpl.cs

@ -483,8 +483,8 @@ namespace Avalonia.Win32
IntPtr.Zero, IntPtr.Zero,
0, 0,
0, 0,
requestedClientWidth + (windowRect.Width - clientRect.Width), requestedClientWidth + (_isClientAreaExtended ? 0 : windowRect.Width - clientRect.Width),
requestedClientHeight + (windowRect.Height - clientRect.Height), requestedClientHeight + (_isClientAreaExtended ? 0 : windowRect.Height - clientRect.Height),
SetWindowPosFlags.SWP_RESIZE); SetWindowPosFlags.SWP_RESIZE);
} }
} }
@ -883,20 +883,19 @@ namespace Avalonia.Win32
_isClientAreaExtended = false; _isClientAreaExtended = false;
return; return;
} }
GetClientRect(_hwnd, out var rcClient);
GetWindowRect(_hwnd, out var rcClient); GetWindowRect(_hwnd, out var rcWindow);
// Inform the application of the frame change. // Inform the application of the frame change.
SetWindowPos(_hwnd, SetWindowPos(_hwnd,
IntPtr.Zero, IntPtr.Zero,
rcClient.left, rcClient.top, rcWindow.left, rcWindow.top,
rcClient.Width, rcClient.Height, rcClient.Width, rcClient.Height,
SetWindowPosFlags.SWP_FRAMECHANGED); SetWindowPosFlags.SWP_FRAMECHANGED);
if (_isClientAreaExtended && WindowState != WindowState.FullScreen) if (_isClientAreaExtended && WindowState != WindowState.FullScreen)
{ {
var margins = UpdateExtendMargins(); var margins = UpdateExtendMargins();
DwmExtendFrameIntoClientArea(_hwnd, ref margins); DwmExtendFrameIntoClientArea(_hwnd, ref margins);
} }
else else
@ -906,6 +905,8 @@ namespace Avalonia.Win32
_offScreenMargin = new Thickness(); _offScreenMargin = new Thickness();
_extendedMargins = new Thickness(); _extendedMargins = new Thickness();
Resize(new Size(rcWindow.Width/ RenderScaling, rcWindow.Height / RenderScaling));
} }
if(!_isClientAreaExtended || (_extendChromeHints.HasFlagCustom(ExtendClientAreaChromeHints.SystemChrome) && if(!_isClientAreaExtended || (_extendChromeHints.HasFlagCustom(ExtendClientAreaChromeHints.SystemChrome) &&

Loading…
Cancel
Save