Commit 4f99560e authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

comctl32: Remove duplicated code for scroll control size calculation.

parent a17d5181
...@@ -1023,37 +1023,18 @@ static void TAB_SetupScrolling( ...@@ -1023,37 +1023,18 @@ static void TAB_SetupScrolling(
/* /*
* Calculate the position of the scroll control. * Calculate the position of the scroll control.
*/ */
if(infoPtr->dwStyle & TCS_VERTICAL) controlPos.right = clientRect->right;
{ controlPos.left = controlPos.right - 2 * GetSystemMetrics(SM_CXHSCROLL);
controlPos.right = clientRect->right;
controlPos.left = controlPos.right - 2 * GetSystemMetrics(SM_CXHSCROLL);
if (infoPtr->dwStyle & TCS_BOTTOM) if (infoPtr->dwStyle & TCS_BOTTOM)
{ {
controlPos.top = clientRect->bottom - infoPtr->tabHeight; controlPos.top = clientRect->bottom - infoPtr->tabHeight;
controlPos.bottom = controlPos.top + GetSystemMetrics(SM_CYHSCROLL); controlPos.bottom = controlPos.top + GetSystemMetrics(SM_CYHSCROLL);
}
else
{
controlPos.bottom = clientRect->top + infoPtr->tabHeight;
controlPos.top = controlPos.bottom - GetSystemMetrics(SM_CYHSCROLL);
}
} }
else else
{ {
controlPos.right = clientRect->right; controlPos.bottom = clientRect->top + infoPtr->tabHeight;
controlPos.left = controlPos.right - 2 * GetSystemMetrics(SM_CXHSCROLL); controlPos.top = controlPos.bottom - GetSystemMetrics(SM_CYHSCROLL);
if (infoPtr->dwStyle & TCS_BOTTOM)
{
controlPos.top = clientRect->bottom - infoPtr->tabHeight;
controlPos.bottom = controlPos.top + GetSystemMetrics(SM_CYHSCROLL);
}
else
{
controlPos.bottom = clientRect->top + infoPtr->tabHeight;
controlPos.top = controlPos.bottom - GetSystemMetrics(SM_CYHSCROLL);
}
} }
/* /*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment