Commit 5b0c2889 authored by David Quintana's avatar David Quintana Committed by Alexandre Julliard

comctl32: Fix horizontal separators in vertical toolbars.

parent 51c3203e
...@@ -857,8 +857,11 @@ TOOLBAR_DrawButton (const TOOLBAR_INFO *infoPtr, TBUTTON_INFO *btnPtr, HDC hdc, ...@@ -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 */ /* empirical tests show that iBitmap can/will be non-zero */
/* when drawing the vertical bar... */ /* when drawing the vertical bar... */
if ((dwStyle & TBSTYLE_FLAT) /* && (btnPtr->iBitmap == 0) */) { if ((dwStyle & TBSTYLE_FLAT) /* && (btnPtr->iBitmap == 0) */) {
if (dwStyle & CCS_VERT) if (dwStyle & CCS_VERT) {
TOOLBAR_DrawFlatHorizontalSeparator (&rc, hdc, infoPtr); RECT rcsep = rc;
InflateRect(&rcsep, -infoPtr->szPadding.cx, -infoPtr->szPadding.cy);
TOOLBAR_DrawFlatHorizontalSeparator (&rcsep, hdc, infoPtr);
}
else else
TOOLBAR_DrawFlatSeparator (&rc, hdc, infoPtr); TOOLBAR_DrawFlatSeparator (&rc, hdc, infoPtr);
} }
...@@ -1676,7 +1679,7 @@ TOOLBAR_LayoutToolbar(TOOLBAR_INFO *infoPtr) ...@@ -1676,7 +1679,7 @@ TOOLBAR_LayoutToolbar(TOOLBAR_INFO *infoPtr)
if (btnPtr->fsStyle & BTNS_SEP) { if (btnPtr->fsStyle & BTNS_SEP) {
if (infoPtr->dwStyle & CCS_VERT) { if (infoPtr->dwStyle & CCS_VERT) {
cy = (btnPtr->iBitmap > 0) ? btnPtr->iBitmap : SEPARATOR_WIDTH; 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 else
cx = (btnPtr->cx > 0) ? btnPtr->cx : cx = (btnPtr->cx > 0) ? btnPtr->cx :
......
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