Merge branch 'dev/migrie/f/1625-less-round-more-shadow' into dev/migrie/f/newtab-btn-float-left

# Conflicts:
#	src/cascadia/WindowsTerminal/NonClientIslandWindow.cpp
This commit is contained in:
Mike Griese
2019-07-12 14:37:02 -05:00

View File

@@ -172,8 +172,9 @@ void NonClientIslandWindow::OnSize(const UINT width, const UINT height)
_rootGrid.Arrange(finalRect);
}
// I'm not sure that HWND_BOTTOM is any different than HWND_TOP for us.
winrt::check_bool(SetWindowPos(_interopWindowHandle,
HWND_TOP,
HWND_BOTTOM,
xPos,
yPos,
windowsWidth,
@@ -202,7 +203,6 @@ void NonClientIslandWindow::_UpdateDragRegion()
const auto width = windowRect.right - windowRect.left;
const auto height = windowRect.bottom - windowRect.top;
const auto scale = GetCurrentDpiScale();
const auto dpi = ::GetDpiForWindow(_window.get());
const auto dragY = ::GetSystemMetricsForDpi(SM_CYDRAG, dpi);
@@ -337,7 +337,7 @@ MARGINS NonClientIslandWindow::GetFrameMargins() const noexcept
// - the HRESULT returned by DwmExtendFrameIntoClientArea.
[[nodiscard]] HRESULT NonClientIslandWindow::_UpdateFrameMargins() const noexcept
{
// Set frame margines with just a single pixel on the bottom. We don't
// Set frame margins with just a single pixel on the bottom. We don't
// really want a window frame at all - we're drawing all of it. We
// especially don't want a top margin - that's where the caption buttons
// are, and we're drawing those. So just set a single pixel on the bottom,
@@ -536,19 +536,19 @@ RECT NonClientIslandWindow::GetMaxWindowRectInPixels(const RECT* const prcSugges
const auto color = RGB(backgroundColor.R, backgroundColor.G, backgroundColor.B);
_backgroundBrush = wil::unique_hbrush(CreateSolidBrush(color));
// Fill in the area between the non-client content and the caption buttons.
RECT dragBarRect = GetDragAreaRect();
dragBarRect.left += xPos;
dragBarRect.right += xPos;
dragBarRect.bottom += yPos;
dragBarRect.top += yPos;
::FillRect(hdc.get(), &dragBarRect, _backgroundBrush.get());
RECT windowRect = {};
::GetWindowRect(_window.get(), &windowRect);
const auto cx = windowRect.right - windowRect.left;
const auto cy = windowRect.bottom - windowRect.top;
// Fill in the _entire_ titlebar area.
RECT dragBarRect = {};
dragBarRect.left = xPos;
dragBarRect.right = xPos + cx;
dragBarRect.top = yPos;
dragBarRect.bottom = yPos + cy;
::FillRect(hdc.get(), &dragBarRect, _backgroundBrush.get());
// Draw the top window border
RECT clientRect = { 0, 0, cx, yPos };
::FillRect(hdc.get(), &clientRect, _backgroundBrush.get());