summaryrefslogtreecommitdiff
path: root/eel
diff options
context:
space:
mode:
authorWolfgang Ulbrich <[email protected]>2016-01-09 20:29:00 +0100
committerWolfgang Ulbrich <[email protected]>2016-01-13 15:05:42 +0100
commit59d1c9281e80922c2bda883c4635379022beb375 (patch)
tree60cd02a07bc47102ca1c43fa9e2dbbf3d84a4f43 /eel
parent8b37981175499c9c876648165ddb7a5f94ae6849 (diff)
downloadcaja-59d1c9281e80922c2bda883c4635379022beb375.tar.bz2
caja-59d1c9281e80922c2bda883c4635379022beb375.tar.xz
GTK3 editable-label: make sure to size_request the padding set on the label
And not the alignment, which is an offset inside the allocated size. taken from: https://git.gnome.org/browse/nautilus/commit/?id=8b87a3e
Diffstat (limited to 'eel')
-rw-r--r--eel/eel-editable-label.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/eel/eel-editable-label.c b/eel/eel-editable-label.c
index 68233ab7..9f2fd3a3 100644
--- a/eel/eel-editable-label.c
+++ b/eel/eel-editable-label.c
@@ -1154,7 +1154,11 @@ eel_editable_label_size_request (GtkWidget *widget,
gint width, height;
PangoRectangle logical_rect;
gint set_width;
+#if GTK_CHECK_VERSION(3,0,0)
+ gint xpad, ypad;
+#else
gfloat xpad, ypad;
+#endif
g_assert (EEL_IS_EDITABLE_LABEL (widget));
g_assert (requisition != NULL);
@@ -1179,8 +1183,13 @@ eel_editable_label_size_request (GtkWidget *widget,
eel_editable_label_ensure_layout (label, TRUE);
+#if GTK_CHECK_VERSION(3,0,0)
+ gtk_misc_get_padding (&label->misc,
+ &xpad, &ypad);
+#else
gtk_misc_get_alignment (&label->misc,
&xpad, &ypad);
+#endif
width = xpad * 2;
height = ypad * 2;