Gave toolbars some extra height, Without which DoGetBestSize can report a size that's

smaller than the actual window, causing windows to overlap slightly
in some circumstances, leading to missing borders. Removed a hack in AUI to
adjust for wrongly reported size.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@47974 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2007-08-09 15:09:03 +00:00
parent c2074367fa
commit bc4dba6b4c
2 changed files with 14 additions and 5 deletions

View File

@@ -524,7 +524,7 @@ wxAuiManager::~wxAuiManager()
delete pinfo.window;
}
#endif
delete m_art;
}
@@ -929,7 +929,8 @@ bool wxAuiManager::AddPane(wxWindow* window, const wxAuiPaneInfo& pane_info)
// I believe this to be the correct action, until
// wxToolBar::GetBestSize() is fixed. Is this assumption
// correct?
pinfo.best_size.y++;
// commented out by JACS 2007-9-08 after having added a pixel in wxMSW's wxToolBar::DoGetBestSize()
// pinfo.best_size.y++;
}
if (pinfo.min_size != wxDefaultSize)
@@ -3566,7 +3567,7 @@ void wxAuiManager::OnRender(wxAuiManagerEvent& evt)
// if the frame is about to be deleted, don't bother
if (!m_frame || wxPendingDelete.Member(m_frame))
return;
wxDC* dc = evt.GetDC();
#ifdef __WXMAC__

View File

@@ -362,8 +362,16 @@ wxSize wxToolBar::DoGetBestSize() const
sizeBest.y = size.cy;
}
if (!IsVertical() && !(GetWindowStyle() & wxTB_NODIVIDER))
sizeBest.y += 1;
if (!IsVertical())
{
// Without the extra height, DoGetBestSize can report a size that's
// smaller than the actual window, causing windows to overlap slightly
// in some circumstances, leading to missing borders (especially noticeable
// in AUI layouts).
if (!(GetWindowStyle() & wxTB_NODIVIDER))
sizeBest.y += 2;
sizeBest.y ++;
}
CacheBestSize(sizeBest);