GNOME Bugzilla – Bug 698030
GtkButton size_allocate and get_size (get_preferred_width/height) mismatch
Last modified: 2014-09-29 19:50:54 UTC
gtk_button_get_size does _not_ check can_focus flag before adding focus-line-width and focus-padding. gtk_button_size_allocate does check can_focus flag, before subtracting line-width and focus-padding. This means that if the can_focus flag is set to FALSE, child allocation is larger than the size requested by it. In certain conditions, when e.g. the child uses its previous allocation to request a new size, this makes the child grow at every size request/allocate cycle.
Created attachment 241602 [details] [review] A fix A patch against gtk-3-6 illustrating the idea.
we no longer use focus_width or focus_pad in gtkbutton.c