Module: wine Branch: master Commit: 5b0c2889778f7ae0135383b3548dee7a3251113a URL: http://source.winehq.org/git/wine.git/?a=commit;h=5b0c2889778f7ae0135383b354...
Author: David Quintana gigaherz@gmail.com Date: Thu Mar 13 11:23:06 2014 +0100
comctl32: Fix horizontal separators in vertical toolbars.
---
dlls/comctl32/toolbar.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/dlls/comctl32/toolbar.c b/dlls/comctl32/toolbar.c index fb82961..e716bab 100644 --- a/dlls/comctl32/toolbar.c +++ b/dlls/comctl32/toolbar.c @@ -857,8 +857,11 @@ TOOLBAR_DrawButton (const TOOLBAR_INFO *infoPtr, TBUTTON_INFO *btnPtr, HDC hdc, /* 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); + 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); } @@ -1676,7 +1679,7 @@ TOOLBAR_LayoutToolbar(TOOLBAR_INFO *infoPtr) 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 :