diff options
author | Wolfgang Ulbrich <[email protected]> | 2016-01-09 20:29:00 +0100 |
---|---|---|
committer | Wolfgang Ulbrich <[email protected]> | 2016-01-13 15:05:42 +0100 |
commit | 59d1c9281e80922c2bda883c4635379022beb375 (patch) | |
tree | 60cd02a07bc47102ca1c43fa9e2dbbf3d84a4f43 /eel | |
parent | 8b37981175499c9c876648165ddb7a5f94ae6849 (diff) | |
download | caja-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.c | 9 |
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; |