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,8 +1023,6 @@ static void TAB_SetupScrolling( ...@@ -1023,8 +1023,6 @@ 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.right = clientRect->right;
controlPos.left = controlPos.right - 2 * GetSystemMetrics(SM_CXHSCROLL); controlPos.left = controlPos.right - 2 * GetSystemMetrics(SM_CXHSCROLL);
...@@ -1038,23 +1036,6 @@ static void TAB_SetupScrolling( ...@@ -1038,23 +1036,6 @@ static void TAB_SetupScrolling(
controlPos.bottom = clientRect->top + infoPtr->tabHeight; controlPos.bottom = clientRect->top + infoPtr->tabHeight;
controlPos.top = controlPos.bottom - GetSystemMetrics(SM_CYHSCROLL); controlPos.top = controlPos.bottom - GetSystemMetrics(SM_CYHSCROLL);
} }
}
else
{
controlPos.right = clientRect->right;
controlPos.left = controlPos.right - 2 * GetSystemMetrics(SM_CXHSCROLL);
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);
}
}
/* /*
* If we don't have a scroll control yet, we want to create one. * If we don't have a scroll control yet, we want to create one.
......
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