From fa755cf187ebfb1c0b9ef4952053c91a3277a7ae Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Tue, 29 Aug 2000 13:21:07 +0000 Subject: [PATCH] Don't allow for status or toolbar size if they are not currently shown git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8208 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/frame.cpp | 12 ++++++------ src/gtk1/frame.cpp | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/gtk/frame.cpp b/src/gtk/frame.cpp index 22ac5af1c2..6ec8172194 100644 --- a/src/gtk/frame.cpp +++ b/src/gtk/frame.cpp @@ -627,12 +627,12 @@ void wxFrame::DoGetClientSize( int *width, int *height ) const #if wxUSE_STATUSBAR /* status bar */ - if (m_frameStatusBar) (*height) -= wxSTATUS_HEIGHT; + if (m_frameStatusBar && m_frameStatusBar->IsShown()) (*height) -= wxSTATUS_HEIGHT; #endif // wxUSE_STATUSBAR #if wxUSE_TOOLBAR /* tool bar */ - if (m_frameToolBar) + if (m_frameToolBar && m_frameToolBar->IsShown()) { if (m_toolBarDetached) { @@ -678,12 +678,12 @@ void wxFrame::DoSetClientSize( int width, int height ) #if wxUSE_STATUSBAR /* status bar */ - if (m_frameStatusBar) height += wxSTATUS_HEIGHT; + if (m_frameStatusBar && m_frameStatusBar->IsShown()) height += wxSTATUS_HEIGHT; #endif #if wxUSE_TOOLBAR /* tool bar */ - if (m_frameToolBar) + if (m_frameToolBar && m_frameToolBar->IsShown()) { if (m_toolBarDetached) { @@ -781,7 +781,7 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), } #if wxUSE_TOOLBAR - if ((m_frameToolBar) && + if ((m_frameToolBar) && m_frameToolBar->IsShown() && (m_frameToolBar->m_widget->parent == m_mainWidget)) { int xx = m_miniEdge; @@ -837,7 +837,7 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), } #if wxUSE_STATUSBAR - if (m_frameStatusBar) + if (m_frameStatusBar && m_frameStatusBar->IsShown()) { int xx = 0 + m_miniEdge; int yy = m_height - wxSTATUS_HEIGHT - m_miniEdge - client_area_y_offset; diff --git a/src/gtk1/frame.cpp b/src/gtk1/frame.cpp index 22ac5af1c2..6ec8172194 100644 --- a/src/gtk1/frame.cpp +++ b/src/gtk1/frame.cpp @@ -627,12 +627,12 @@ void wxFrame::DoGetClientSize( int *width, int *height ) const #if wxUSE_STATUSBAR /* status bar */ - if (m_frameStatusBar) (*height) -= wxSTATUS_HEIGHT; + if (m_frameStatusBar && m_frameStatusBar->IsShown()) (*height) -= wxSTATUS_HEIGHT; #endif // wxUSE_STATUSBAR #if wxUSE_TOOLBAR /* tool bar */ - if (m_frameToolBar) + if (m_frameToolBar && m_frameToolBar->IsShown()) { if (m_toolBarDetached) { @@ -678,12 +678,12 @@ void wxFrame::DoSetClientSize( int width, int height ) #if wxUSE_STATUSBAR /* status bar */ - if (m_frameStatusBar) height += wxSTATUS_HEIGHT; + if (m_frameStatusBar && m_frameStatusBar->IsShown()) height += wxSTATUS_HEIGHT; #endif #if wxUSE_TOOLBAR /* tool bar */ - if (m_frameToolBar) + if (m_frameToolBar && m_frameToolBar->IsShown()) { if (m_toolBarDetached) { @@ -781,7 +781,7 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), } #if wxUSE_TOOLBAR - if ((m_frameToolBar) && + if ((m_frameToolBar) && m_frameToolBar->IsShown() && (m_frameToolBar->m_widget->parent == m_mainWidget)) { int xx = m_miniEdge; @@ -837,7 +837,7 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), } #if wxUSE_STATUSBAR - if (m_frameStatusBar) + if (m_frameStatusBar && m_frameStatusBar->IsShown()) { int xx = 0 + m_miniEdge; int yy = m_height - wxSTATUS_HEIGHT - m_miniEdge - client_area_y_offset;