From 1f7e5f7be3495d4db03b3b4985f8fbaa69a3396d Mon Sep 17 00:00:00 2001 From: =?utf8?q?W=C5=82odzimierz=20Skiba?= Date: Tue, 23 May 2006 16:05:12 +0000 Subject: [PATCH] [ 1470717 ] wxUniv toolbar separator drawing fix. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39290 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/univ/themes/win32.cpp | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/univ/themes/win32.cpp b/src/univ/themes/win32.cpp index 2e7413b2ce..2465b06995 100644 --- a/src/univ/themes/win32.cpp +++ b/src/univ/themes/win32.cpp @@ -2499,9 +2499,20 @@ void wxWin32Renderer::DrawToolBarButton(wxDC& dc, { // leave a small gap aroudn the line, also account for the toolbar // border itself - DrawVerticalLine(dc, rectOrig.x + rectOrig.width/2, - rectOrig.y + 2*BORDER_THICKNESS, - rectOrig.GetBottom() - BORDER_THICKNESS); + if(rectOrig.height > rectOrig.width) + { + // horizontal + DrawVerticalLine(dc, rectOrig.x + rectOrig.width/2, + rectOrig.y + 2*BORDER_THICKNESS, + rectOrig.GetBottom() - BORDER_THICKNESS); + } + else + { + // vertical + DrawHorizontalLine(dc, rectOrig.y + rectOrig.height/2, + rectOrig.x + 2*BORDER_THICKNESS, + rectOrig.GetRight() - BORDER_THICKNESS); + } } // don't draw wxTOOL_STYLE_CONTROL } -- 2.45.2