GNOME Bugzilla – Bug 752509
GtkFileChooserButton causes layout jumps
Last modified: 2015-07-17 03:37:41 UTC
GtkFileChooserButton updates its label and icon on every style-updated emission, which e.g. happens when (un)focusing the window (like when closing/opening the filechooserdialog). I'll attach a patch that only updates icon/label when the icontheme actually changed, which is the only case where this should happend (I hope, the commit that added this case isn't very meaningful...).
Created attachment 307586 [details] [review] GtkFileChooserButton: Don't update icon/label so often They were updated in style-changed, causing the label to get set to (None), then to the actual file name again a frame later, both of the updates cause the GtkFileChooserButton to resize, possibly to the minimal width, causing the layout to jump. Fix this by only updating icon/label in style-updated when the icon theme actually changed, which is the only case we care about here.
Review of attachment 307586 [details] [review]: this was already ok'ed on irc, believe. ::: gtk/gtkfilechooserbutton.c @@ +1477,3 @@ + { + /* We need to update the icon surface, but only in case + the icon theme really changed. */ Pet peeve: /* I prefer my comments lined up * like this */
Ok pushed, thanks.