Author: dquintana Date: Wed Mar 5 11:48:55 2014 New Revision: 62426
URL: http://svn.reactos.org/svn/reactos?rev=62426&view=rev Log: [COMCTL32] * Make horizontal separators of vertical toolbars draw. * Apply the same padding to separators as the rest of the buttons. * Fixup some tabs into spaces, for consistency. * Needs to be sent to wine.
Modified: branches/shell-experiments/dll/win32/comctl32/toolbar.c
Modified: branches/shell-experiments/dll/win32/comctl32/toolbar.c URL: http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/comc... ============================================================================== --- branches/shell-experiments/dll/win32/comctl32/toolbar.c [iso-8859-1] (original) +++ branches/shell-experiments/dll/win32/comctl32/toolbar.c [iso-8859-1] Wed Mar 5 11:48:55 2014 @@ -843,16 +843,20 @@ /* empirical tests show that iBitmap can/will be non-zero */ /* when drawing the vertical bar... */ if ((dwStyle & TBSTYLE_FLAT) /* && (btnPtr->iBitmap == 0) */) { - if (dwStyle & CCS_VERT) - TOOLBAR_DrawFlatHorizontalSeparator (&rc, hdc, infoPtr); - else - TOOLBAR_DrawFlatSeparator (&rc, hdc, infoPtr); - } - else if (btnPtr->fsStyle != BTNS_SEP) { - FIXME("Draw some kind of separator: fsStyle=%x\n", - btnPtr->fsStyle); - } - return; + if (dwStyle & CCS_VERT) { + RECT rcsep = rc; + InflateRect(&rcsep, -infoPtr->szPadding.cx, -infoPtr->szPadding.cy); + TOOLBAR_DrawFlatHorizontalSeparator (&rcsep, hdc, infoPtr); + } + else { + TOOLBAR_DrawFlatSeparator (&rc, hdc, infoPtr); + } + } + else if (btnPtr->fsStyle != BTNS_SEP) { + FIXME("Draw some kind of separator: fsStyle=%x\n", + btnPtr->fsStyle); + } + return; }
/* get a pointer to the text */ @@ -1662,7 +1666,7 @@ if (btnPtr->fsStyle & BTNS_SEP) { if (infoPtr->dwStyle & CCS_VERT) { cy = (btnPtr->iBitmap > 0) ? btnPtr->iBitmap : SEPARATOR_WIDTH; - cx = (btnPtr->cx > 0) ? btnPtr->cx : infoPtr->nWidth; + cx = (btnPtr->cx > 0) ? btnPtr->cx : infoPtr->nButtonWidth; } else cx = (btnPtr->cx > 0) ? btnPtr->cx :