vcl/unx/gtk3/gtk3gtkinst.cxx | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
New commits: commit 670f0b16f3d3f2a879303ef06ba8a08f275c1380 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Mon Apr 13 20:53:05 2020 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Tue Apr 14 10:41:33 2020 +0200 improve reparenting to keep size-group and size-request Change-Id: Id12fc3f5c55d7ed027f11645bb17233d2da9e268 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92129 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index 4dc4f10152d2..bc36504a4234 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -1746,6 +1746,21 @@ namespace gtk_container_remove(GTK_CONTAINER(pParent), pWidget); gtk_widget_set_visible(pReplacement, gtk_widget_get_visible(pWidget)); + gtk_widget_set_no_show_all(pReplacement, gtk_widget_get_no_show_all(pWidget)); + + int nReqWidth, nReqHeight; + gtk_widget_get_size_request(pWidget, &nReqWidth, &nReqHeight); + gtk_widget_set_size_request(pReplacement, nReqWidth, nReqHeight); + + static GQuark quark_size_groups = g_quark_from_static_string("gtk-widget-size-groups"); + GSList* pSizeGroups = static_cast<GSList*>(g_object_get_qdata(G_OBJECT(pWidget), quark_size_groups)); + while (pSizeGroups) + { + GtkSizeGroup *pSizeGroup = static_cast<GtkSizeGroup*>(pSizeGroups->data); + pSizeGroups = pSizeGroups->next; + gtk_size_group_remove_widget(pSizeGroup, pWidget); + gtk_size_group_add_widget(pSizeGroup, pReplacement); + } gtk_container_add(GTK_CONTAINER(pParent), pReplacement); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits