X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/36b3b54ad8431bca0fa53fa8acae5ba6d4c3e9c7..9f3362c440ef4c780d9a4bc8089de60a21d108bd:/src/gtk/frame.cpp?ds=sidebyside diff --git a/src/gtk/frame.cpp b/src/gtk/frame.cpp index d21f976cc8..d809e69266 100644 --- a/src/gtk/frame.cpp +++ b/src/gtk/frame.cpp @@ -299,8 +299,8 @@ void wxFrame::SetSize( int x, int y, int width, int height, int sizeFlags ) if ((m_minWidth != -1) && (m_width < m_minWidth)) m_width = m_minWidth; if ((m_minHeight != -1) && (m_height < m_minHeight)) m_height = m_minHeight; - if ((m_maxWidth != -1) && (m_width > m_maxWidth)) m_width = m_minWidth; - if ((m_maxHeight != -1) && (m_height > m_maxHeight)) m_height = m_minHeight; + if ((m_maxWidth != -1) && (m_width > m_maxWidth)) m_width = m_maxWidth; + if ((m_maxHeight != -1) && (m_height > m_maxHeight)) m_height = m_maxHeight; if ((m_x != -1) || (m_y != -1)) { @@ -310,7 +310,7 @@ void wxFrame::SetSize( int x, int y, int width, int height, int sizeFlags ) if ((m_width != old_width) || (m_height != old_height)) { - gtk_widget_set_usize( m_widget, m_width, m_height ); + gtk_widget_set_usize( m_widget, m_width, m_height ); } wxSizeEvent event( wxSize(m_width,m_height), GetId() ); @@ -393,8 +393,8 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), int width, int height if ((m_minWidth != -1) && (m_width < m_minWidth)) m_width = m_minWidth; if ((m_minHeight != -1) && (m_height < m_minHeight)) m_height = m_minHeight; - if ((m_maxWidth != -1) && (m_width > m_maxWidth)) m_width = m_minWidth; - if ((m_maxHeight != -1) && (m_height > m_maxHeight)) m_height = m_minHeight; + if ((m_maxWidth != -1) && (m_width > m_maxWidth)) m_width = m_maxWidth; + if ((m_maxHeight != -1) && (m_height > m_maxHeight)) m_height = m_maxHeight; gtk_widget_set_usize( m_widget, m_width, m_height ); @@ -453,10 +453,21 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), int width, int height m_sizeSet = TRUE; + /* send size event to frame */ + wxSizeEvent event( wxSize(m_width,m_height), GetId() ); event.SetEventObject( this ); GetEventHandler()->ProcessEvent( event ); + /* send size event to status bar */ + + if (m_frameStatusBar) + { + wxSizeEvent event2( wxSize(m_frameStatusBar->m_width,m_frameStatusBar->m_height), m_frameStatusBar->GetId() ); + event2.SetEventObject( m_frameStatusBar ); + m_frameStatusBar->GetEventHandler()->ProcessEvent( event2 ); + } + m_resizing = FALSE; }