Module: wine Branch: master Commit: 4f99560ef006d729b9a79284124d045788ba83fd URL: http://source.winehq.org/git/wine.git/?a=commit;h=4f99560ef006d729b9a7928412...
Author: Nikolay Sivov nsivov@codeweavers.com Date: Sun May 19 10:54:39 2013 +0400
comctl32: Remove duplicated code for scroll control size calculation.
---
dlls/comctl32/tab.c | 35 ++++++++--------------------------- 1 files changed, 8 insertions(+), 27 deletions(-)
diff --git a/dlls/comctl32/tab.c b/dlls/comctl32/tab.c index 43d8cdf..229e72b 100644 --- a/dlls/comctl32/tab.c +++ b/dlls/comctl32/tab.c @@ -1023,37 +1023,18 @@ static void TAB_SetupScrolling( /* * 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) - { - 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 (infoPtr->dwStyle & TCS_BOTTOM) + { + controlPos.top = clientRect->bottom - infoPtr->tabHeight; + controlPos.bottom = controlPos.top + 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); - } + controlPos.bottom = clientRect->top + infoPtr->tabHeight; + controlPos.top = controlPos.bottom - GetSystemMetrics(SM_CYHSCROLL); }
/*