[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Fri Jun 7 09:47:25 UTC 2019


 vcl/unx/gtk3/gtk3gtkframe.cxx |   19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

New commits:
commit 8eff9425897a42acb3f95750a4a2654e4f428444
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed May 29 15:41:15 2019 +0100
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Fri Jun 7 11:46:51 2019 +0200

    tdf#124694 gtk3 GtkFixed takes the max size of all its children...
    
    as its preferred size, causing it to not clip its child, but grow instead to
    match
    
    Change-Id: I57f740177aae619d11966f5382a6cc5f7a964be3
    Reviewed-on: https://gerrit.libreoffice.org/73170
    Tested-by: Jenkins
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>

diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index 2127a52d2c1e..adcde282e3b1 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -913,11 +913,30 @@ void GtkSalFrame::resizeWindow( long nWidth, long nHeight )
         window_resize(nWidth, nHeight);
 }
 
+// tdf#124694 GtkFixed takes the max size of all its children as its
+// preferred size, causing it to not clip its child, but grow instead.
+
+static void
+ooo_fixed_get_preferred_height(GtkWidget*, gint *minimum, gint *natural)
+{
+    *minimum = 0;
+    *natural = 0;
+}
+
+static void
+ooo_fixed_get_preferred_width(GtkWidget*, gint *minimum, gint *natural)
+{
+    *minimum = 0;
+    *natural = 0;
+}
+
 static void
 ooo_fixed_class_init(GtkFixedClass *klass)
 {
     GtkWidgetClass *widget_class = GTK_WIDGET_CLASS(klass);
     widget_class->get_accessible = ooo_fixed_get_accessible;
+    widget_class->get_preferred_height = ooo_fixed_get_preferred_height;
+    widget_class->get_preferred_width = ooo_fixed_get_preferred_width;
 }
 
 /*


More information about the Libreoffice-commits mailing list