From: Vadim Zeitlin Date: Thu, 10 Jul 2003 12:01:15 +0000 (+0000) Subject: correction to the separators in vertical toolbar after patch X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/286034884f39fedd65c9a3184c2e5af9c4d5f131?ds=inline correction to the separators in vertical toolbar after patch git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21857 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/tbar95.cpp b/src/msw/tbar95.cpp index 9315f82fe6..3f0bc66692 100644 --- a/src/msw/tbar95.cpp +++ b/src/msw/tbar95.cpp @@ -659,9 +659,14 @@ bool wxToolBar::Realize() { wxToolBarToolBase *tool = node->GetData(); - // don't add separators to the vertical toolbar - looks ugly - //if ( isVertical && tool->IsSeparator() ) - // continue; + // don't add separators to the vertical toolbar with old comctl32.dll + // versions as they didn't handle this properly + if ( isVertical && tool->IsSeparator() && + wxTheApp->GetComCtl32Version() <= 472 ) + { + continue; + } + TBBUTTON& button = buttons[i]; @@ -1195,12 +1200,8 @@ bool wxToolBar::HandleSize(WXWPARAM wParam, WXLPARAM lParam) h = r.bottom - r.top; if ( m_maxRows ) { - // FIXME: 6 is hardcoded separator line height... - //h += 6; - if (HasFlag(wxTB_NODIVIDER)) - h += 4; - else - h += 6; + // FIXME: hardcoded separator line height... + h += HasFlag(wxTB_NODIVIDER) ? 4 : 6; h *= m_maxRows; } }