[UXTHEME] nonclient.c: Formatting only

This commit is contained in:
Stanislav Motylkov 2024-02-15 14:22:02 +03:00
parent 118869f69c
commit fa29a61271

View file

@ -35,6 +35,7 @@ BOOL
IsScrollBarVisible(HWND hWnd, INT hBar) IsScrollBarVisible(HWND hWnd, INT hBar)
{ {
SCROLLBARINFO sbi = {sizeof(SCROLLBARINFO)}; SCROLLBARINFO sbi = {sizeof(SCROLLBARINFO)};
if (!GetScrollBarInfo(hWnd, hBar, &sbi)) if (!GetScrollBarInfo(hWnd, hBar, &sbi))
return FALSE; return FALSE;
@ -270,6 +271,7 @@ void ThemeCalculateCaptionButtonsPos(HWND hWnd, HTHEME htheme)
{ {
INT btnHeight; INT btnHeight;
WINDOWINFO wi = {sizeof(wi)}; WINDOWINFO wi = {sizeof(wi)};
if (!GetWindowInfo(hWnd, &wi)) if (!GetWindowInfo(hWnd, &wi))
return; return;
btnHeight = GetSystemMetrics(wi.dwExStyle & WS_EX_TOOLWINDOW ? SM_CYSMSIZE : SM_CYSIZE); btnHeight = GetSystemMetrics(wi.dwExStyle & WS_EX_TOOLWINDOW ? SM_CYSMSIZE : SM_CYSIZE);
@ -794,7 +796,6 @@ ThemeHandleButton(HWND hWnd, WPARAM wParam)
SendMessageW(hWnd, WM_SYSCOMMAND, SCMsg, 0); SendMessageW(hWnd, WM_SYSCOMMAND, SCMsg, 0);
} }
static LRESULT static LRESULT
DefWndNCHitTest(HWND hWnd, POINT Point) DefWndNCHitTest(HWND hWnd, POINT Point)
{ {
@ -1132,7 +1133,6 @@ DrawWindowForNCPreview(
OffsetRect(&rcWindowNew, offsetX, offsetY); OffsetRect(&rcWindowNew, offsetX, offsetY);
ThemeCalculateCaptionButtonsPosEx(&pcontext->wi, pcontext->hWnd, pcontext->theme, pcontext->CaptionHeight - pcontext->wi.cyWindowBorders); ThemeCalculateCaptionButtonsPosEx(&pcontext->wi, pcontext->hWnd, pcontext->theme, pcontext->CaptionHeight - pcontext->wi.cyWindowBorders);
INT leftBorderInset = pcontext->wi.cxWindowBorders; INT leftBorderInset = pcontext->wi.cxWindowBorders;
INT titleBarInset = pcontext->CaptionHeight; // + pcontext->wi.cyWindowBorders; INT titleBarInset = pcontext->CaptionHeight; // + pcontext->wi.cyWindowBorders;
INT rightBorderInset = pcontext->wi.cxWindowBorders; INT rightBorderInset = pcontext->wi.cxWindowBorders;
@ -1265,7 +1265,6 @@ HRESULT WINAPI DrawNCPreview(HDC hDC,
if (textFont) if (textFont)
SelectFont(hDC, textFont); SelectFont(hDC, textFont);
SetTextColor(hDC, GetThemeSysColor(context.theme, TMT_WINDOWTEXT)); SetTextColor(hDC, GetThemeSysColor(context.theme, TMT_WINDOWTEXT));
DrawThemeText(context.theme, hDC, WP_DIALOG, 0, L"Window Text", -1, DT_LEFT | DT_TOP | textDrawFlags, 0, &rcWindowClient); DrawThemeText(context.theme, hDC, WP_DIALOG, 0, L"Window Text", -1, DT_LEFT | DT_TOP | textDrawFlags, 0, &rcWindowClient);