X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d7b63a01e9bf64f1d9ff3f39d01bb7800032c44b..02ca710b3b1d275434959ea9f6f1cfc75370146d:/src/gtk/win_gtk.cpp diff --git a/src/gtk/win_gtk.cpp b/src/gtk/win_gtk.cpp index acace1f565..dcbe4fa282 100644 --- a/src/gtk/win_gtk.cpp +++ b/src/gtk/win_gtk.cpp @@ -94,6 +94,8 @@ static void size_allocate(GtkWidget* widget, GtkAllocation* alloc) const GtkFixedChild* child = static_cast(list->data); if (GTK_WIDGET_VISIBLE(child->widget)) { + GtkAllocation child_old_alloc = child->widget->allocation; + GtkAllocation child_alloc; // note that child positions do not take border into // account, they need to be relative to widget->window, @@ -105,9 +107,7 @@ static void size_allocate(GtkWidget* widget, GtkAllocation* alloc) child_alloc.width = req.width; child_alloc.height = req.height; if (gtk_widget_get_direction(widget) == GTK_TEXT_DIR_RTL) - { child_alloc.x = w - child_alloc.x - child_alloc.width; - } gtk_widget_size_allocate(child->widget, &child_alloc); } } @@ -282,10 +282,11 @@ GType wxPizza::type() return type; } -GtkWidget* wxPizza::New(long windowStyle) +GtkWidget* wxPizza::New(long windowStyle,void* owner) { GtkWidget* widget = GTK_WIDGET(g_object_new(type(), NULL)); wxPizza* pizza = WX_PIZZA(widget); + pizza->m_owner = owner; pizza->m_backing_window = NULL; pizza->m_scroll_x = 0; pizza->m_scroll_y = 0; @@ -341,7 +342,7 @@ static void scroll_adjust(GtkWidget* widget, void* data) const AdjustData* p = static_cast(data); widget->allocation.x += p->dx; widget->allocation.y += p->dy; - + if (widget->window == p->window) { // GtkFrame requires a queue_resize, otherwise parts of @@ -376,24 +377,24 @@ void wxPizza::get_border_widths(int& x, int& y) x = y = 0; if (m_border_style == 0) return; - + #ifndef __WXUNIVERSAL__ if (m_border_style & wxBORDER_SIMPLE) x = y = 1; else if (m_is_scrollable || (m_border_style & wxBORDER_THEME)) { GtkWidget *style_widget = wxGTKPrivate::GetTreeWidget(); - + if (style_widget->style) { x = style_widget->style->xthickness; y = style_widget->style->ythickness; } } - else + else { GtkWidget *style_widget = wxGTKPrivate::GetEntryWidget(); - + if (style_widget->style) { x = style_widget->style->xthickness;