made the constraintsin notebook pages work (once again)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@333 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -16,7 +16,6 @@
|
||||
#include "wx/panel.h"
|
||||
#include "wx/utils.h"
|
||||
#include "wx/imaglist.h"
|
||||
#include "wx/intl.h"
|
||||
#include "wx/log.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -71,6 +70,9 @@ static void gtk_notebook_page_change_callback(GtkNotebook *WXUNUSED(widget),
|
||||
|
||||
static void gtk_page_size_callback( GtkWidget *WXUNUSED(widget), GtkAllocation* alloc, wxWindow *win )
|
||||
{
|
||||
if ( win->GetAutoLayout() )
|
||||
win->Layout();
|
||||
|
||||
if ((win->m_x == alloc->x) &&
|
||||
(win->m_y == alloc->y) &&
|
||||
(win->m_width == alloc->width) &&
|
||||
@@ -139,8 +141,6 @@ wxNotebook::~wxNotebook()
|
||||
if ( m_idHandler != 0 )
|
||||
gtk_signal_disconnect(GTK_OBJECT(m_widget), m_idHandler);
|
||||
|
||||
if (m_imageList)
|
||||
delete m_imageList;
|
||||
DeleteAllPages();
|
||||
};
|
||||
|
||||
@@ -433,26 +433,6 @@ void wxNotebook::AddChild( wxWindow *win )
|
||||
m_pages.Append( page );
|
||||
};
|
||||
|
||||
void wxNotebook::OnSize(wxSizeEvent& event)
|
||||
{
|
||||
// forward this event to all pages
|
||||
wxNode *node = m_pages.First();
|
||||
while (node)
|
||||
{
|
||||
wxWindow *page = ((wxNotebookPage*)node->Data())->m_client;
|
||||
// @@@@ the numbers I substract here are completely arbitrary, instead we
|
||||
// should somehow calculate the size of the page from the size of the
|
||||
// notebook
|
||||
/* page->SetSize(event.GetSize().GetX() - 5,
|
||||
event.GetSize().GetY() - 30);
|
||||
|
||||
if ( page->GetAutoLayout() )
|
||||
page->Layout();
|
||||
*/
|
||||
node = node->Next();
|
||||
};
|
||||
}
|
||||
|
||||
// override these 2 functions to do nothing: everything is done in OnSize
|
||||
void wxNotebook::SetConstraintSizes(bool /* recurse */)
|
||||
{
|
||||
|
@@ -16,7 +16,6 @@
|
||||
#include "wx/panel.h"
|
||||
#include "wx/utils.h"
|
||||
#include "wx/imaglist.h"
|
||||
#include "wx/intl.h"
|
||||
#include "wx/log.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -71,6 +70,9 @@ static void gtk_notebook_page_change_callback(GtkNotebook *WXUNUSED(widget),
|
||||
|
||||
static void gtk_page_size_callback( GtkWidget *WXUNUSED(widget), GtkAllocation* alloc, wxWindow *win )
|
||||
{
|
||||
if ( win->GetAutoLayout() )
|
||||
win->Layout();
|
||||
|
||||
if ((win->m_x == alloc->x) &&
|
||||
(win->m_y == alloc->y) &&
|
||||
(win->m_width == alloc->width) &&
|
||||
@@ -139,8 +141,6 @@ wxNotebook::~wxNotebook()
|
||||
if ( m_idHandler != 0 )
|
||||
gtk_signal_disconnect(GTK_OBJECT(m_widget), m_idHandler);
|
||||
|
||||
if (m_imageList)
|
||||
delete m_imageList;
|
||||
DeleteAllPages();
|
||||
};
|
||||
|
||||
@@ -433,26 +433,6 @@ void wxNotebook::AddChild( wxWindow *win )
|
||||
m_pages.Append( page );
|
||||
};
|
||||
|
||||
void wxNotebook::OnSize(wxSizeEvent& event)
|
||||
{
|
||||
// forward this event to all pages
|
||||
wxNode *node = m_pages.First();
|
||||
while (node)
|
||||
{
|
||||
wxWindow *page = ((wxNotebookPage*)node->Data())->m_client;
|
||||
// @@@@ the numbers I substract here are completely arbitrary, instead we
|
||||
// should somehow calculate the size of the page from the size of the
|
||||
// notebook
|
||||
/* page->SetSize(event.GetSize().GetX() - 5,
|
||||
event.GetSize().GetY() - 30);
|
||||
|
||||
if ( page->GetAutoLayout() )
|
||||
page->Layout();
|
||||
*/
|
||||
node = node->Next();
|
||||
};
|
||||
}
|
||||
|
||||
// override these 2 functions to do nothing: everything is done in OnSize
|
||||
void wxNotebook::SetConstraintSizes(bool /* recurse */)
|
||||
{
|
||||
|
Reference in New Issue
Block a user