]> git.saurik.com Git - wxWidgets.git/commitdiff
Minor tweak (up-ported from 2.2.9) to make
authorRobert Roebling <robert@roebling.de>
Sun, 31 Mar 2002 14:06:32 +0000 (14:06 +0000)
committerRobert Roebling <robert@roebling.de>
Sun, 31 Mar 2002 14:06:32 +0000 (14:06 +0000)
    flat toolbars look slightly better even
    without rebar controls underneath.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14879 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/frame.cpp
src/msw/tbar95.cpp

index f6344c7c0ccb857f906f708fbf56fde52b71d71c..2784af2f23176217c76c71f6c2e084927accc6c1 100644 (file)
@@ -495,6 +495,8 @@ void wxFrame::PositionToolBar()
         else
         {
             tw = width;
         else
         {
             tw = width;
+            if ( toolbar->GetWindowStyleFlag() & wxTB_FLAT )
+                th -= 3;
         }
 
         // use the 'real' MSW position here, don't offset relativly to the
         }
 
         // use the 'real' MSW position here, don't offset relativly to the
index 13b388e50951dbc9f43e5d66ac95866682f8f2a3..004af499a59c84bc5b2f6316ed7ea246df30af20 100644 (file)
@@ -1177,7 +1177,10 @@ bool wxToolBar::HandleSize(WXWPARAM wParam, WXLPARAM lParam)
         else
         {
             w = LOWORD(lParam);
         else
         {
             w = LOWORD(lParam);
-            h = r.bottom - r.top;
+            if (HasFlag( wxTB_FLAT ))
+                h = r.bottom - r.top - 3;
+            else
+                h = r.bottom - r.top;
             if ( m_maxRows )
             {
                 // FIXME: 6 is hardcoded separator line height...
             if ( m_maxRows )
             {
                 // FIXME: 6 is hardcoded separator line height...