Skip to content

Commit

Permalink
Merge branch 'dev/migrie/f/1625-less-round-more-shadow' into dev/migr…
Browse files Browse the repository at this point in the history
…ie/f/newtab-btn-float-left

# Conflicts:
#	src/cascadia/WindowsTerminal/NonClientIslandWindow.cpp
  • Loading branch information
zadjii-msft committed Jul 12, 2019
2 parents 1905852 + 9040940 commit 96c5da2
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/cascadia/WindowsTerminal/NonClientIslandWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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());
Expand Down

0 comments on commit 96c5da2

Please sign in to comment.