]> git.saurik.com Git - wxWidgets.git/blobdiff - src/aui/framemanager.cpp
fixed wxOverlay to handle wxWindowDC/wxClientDC in the same way wxMac does
[wxWidgets.git] / src / aui / framemanager.cpp
index dbeeb975e9b71ac80abdf6708732e62760a121fd..18453eb82958e0fc52272e1d3da0feb20b56dcb3 100644 (file)
@@ -834,7 +834,14 @@ bool wxAuiManager::AddPane(wxWindow* window, const wxAuiPaneInfo& pane_info)
         button.button_id = wxAUI_BUTTON_MAXIMIZE_RESTORE;
         pinfo.buttons.Add(button);
     }
-
+    
+    if (pinfo.HasPinButton())
+    {
+        wxAuiPaneButton button;
+        button.button_id = wxAUI_BUTTON_PIN;
+        pinfo.buttons.Add(button);
+    }
+    
     if (pinfo.HasCloseButton())
     {
         wxAuiPaneButton button;
@@ -1542,6 +1549,13 @@ void wxAuiManager::LayoutAddPane(wxSizer* cont,
             part.sizer_item = sizer_item;
             uiparts.Add(part);
         }
+        
+        // if we have buttons, add a little space to the right
+        // of them to ease visual crowding
+        if (button_count >= 1)
+        {
+            caption_sizer->Add(3,1);
+        }
 
         // add the caption sizer
         sizer_item = vert_pane_sizer->Add(caption_sizer, 0, wxEXPAND);
@@ -3520,10 +3534,12 @@ void wxAuiManager::OnSetCursor(wxSetCursorEvent& event)
 
 
 void wxAuiManager::UpdateButtonOnScreen(wxAuiDockUIPart* button_ui_part,
-                                          const wxMouseEvent& event)
+                                        const wxMouseEvent& event)
 {
     wxAuiDockUIPart* hit_test = HitTest(event.GetX(), event.GetY());
-
+    if (!hit_test || !button_ui_part)
+        return;
+        
     int state = wxAUI_BUTTON_STATE_NORMAL;
 
     if (hit_test == button_ui_part)