vcl/unx/gtk3/gtk3gtkobject.cxx | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-)
New commits: commit 5bc2c2c1c86bbf92da4c8210e095e3a9a2928aa6 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Mon Dec 23 15:10:11 2019 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Mon Dec 23 17:25:29 2019 +0100 call gtk_widget_size_allocate explicitly otherwise native gtk sidebar widgets are not initially positioned automatically Change-Id: I835c63c9c18ebc37be57e605b82f748bcff5d1a2 Reviewed-on: https://gerrit.libreoffice.org/85761 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/vcl/unx/gtk3/gtk3gtkobject.cxx b/vcl/unx/gtk3/gtk3gtkobject.cxx index 93db53a159ec..d038a6121432 100644 --- a/vcl/unx/gtk3/gtk3gtkobject.cxx +++ b/vcl/unx/gtk3/gtk3gtkobject.cxx @@ -344,11 +344,25 @@ void GtkSalObjectWidgetClip::ApplyClipRegion() if( m_pSocket ) { GtkFixed* pContainer = GTK_FIXED(gtk_widget_get_parent(m_pScrolledWindow)); - gtk_fixed_move(pContainer, m_pScrolledWindow, m_aRect.Left() + m_aClipRect.Left(), m_aRect.Top() + m_aClipRect.Top()); + + GtkAllocation allocation; + allocation.x = m_aRect.Left() + m_aClipRect.Left(); + allocation.y = m_aRect.Top() + m_aClipRect.Top(); if (m_aClipRect.IsEmpty()) - gtk_widget_set_size_request(m_pScrolledWindow, m_aRect.GetWidth(), m_aRect.GetHeight()); + { + allocation.width = m_aRect.GetWidth(); + allocation.height = m_aRect.GetHeight(); + } else - gtk_widget_set_size_request(m_pScrolledWindow, m_aClipRect.GetWidth(), m_aClipRect.GetHeight()); + { + allocation.width = m_aClipRect.GetWidth(); + allocation.height = m_aClipRect.GetHeight(); + } + + gtk_fixed_move(pContainer, m_pScrolledWindow, allocation.x, allocation.y); + gtk_widget_set_size_request(m_pScrolledWindow, allocation.width, allocation.height); + gtk_widget_size_allocate(m_pScrolledWindow, &allocation); + gtk_adjustment_set_value(gtk_scrolled_window_get_hadjustment(GTK_SCROLLED_WINDOW(m_pScrolledWindow)), m_aClipRect.Left()); gtk_adjustment_set_value(gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(m_pScrolledWindow)), m_aClipRect.Top()); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits