]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/tbar95.cpp
wxSizeEvent now carries the total size, not just the client size
[wxWidgets.git] / src / msw / tbar95.cpp
index 13b388e50951dbc9f43e5d66ac95866682f8f2a3..7c6515ff121ade578094738c8e1286391acfa22e 100644 (file)
@@ -262,6 +262,10 @@ bool wxToolBar::Create(wxWindow *parent,
             msflags |= TBSTYLE_FLAT | TBSTYLE_TRANSPARENT;
         }
     }
+    if (style & wxTB_NODIVIDER)
+        msflags |= CCS_NODIVIDER;
+    if (style & wxTB_NOALIGN)
+        msflags |= CCS_NOPARENTALIGN;
 
     // MSW-specific initialisation
     if ( !wxControl::MSWCreateControl(TOOLBARCLASSNAME, msflags) )
@@ -1177,11 +1181,18 @@ bool wxToolBar::HandleSize(WXWPARAM wParam, WXLPARAM 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...
-                h += 6;
+                //h += 6;
+                if (HasFlag(wxTB_NODIVIDER))
+                    h += 3;
+                else
+                    h += 6;
                 h *= m_maxRows;
             }
         }