summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-05-29 15:41:15 +0100
committerCaolán McNamara <caolanm@redhat.com>2019-05-29 18:05:23 +0200
commit0c62976b4713156e93aa17b9381e010491a49a24 (patch)
tree76adc2eefc4aaf679bc69e5b2f22580e60f30dd2
parentaa687b22991e6c674b1d8653d52fbe9a50080174 (diff)
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/73167 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--vcl/unx/gtk3/gtk3gtkframe.cxx19
1 files changed, 19 insertions, 0 deletions
diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index 27d186923b6f..c180c077bd19 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -763,11 +763,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;
}
/*