]> git.saurik.com Git - wxWidgets.git/commitdiff
Don't allow for status or toolbar size if they are not currently shown
authorJulian Smart <julian@anthemion.co.uk>
Tue, 29 Aug 2000 13:21:07 +0000 (13:21 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Tue, 29 Aug 2000 13:21:07 +0000 (13:21 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8208 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/frame.cpp
src/gtk1/frame.cpp

index 22ac5af1c2b9f5986a465d9c797d434d03ae4f7d..6ec8172194c8797507c17626c5c35d53fee4fa80 100644 (file)
@@ -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;
index 22ac5af1c2b9f5986a465d9c797d434d03ae4f7d..6ec8172194c8797507c17626c5c35d53fee4fa80 100644 (file)
@@ -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;