GNOME Bugzilla – Bug 771435
slight ui glitch in compress window when switching extension
Last modified: 2016-10-04 20:23:34 UTC
There is a slight UI glitch--the window size changes-- when extension is switched. How to reproduce: 1. Selection some file/folder -> compress. 2. select .zip, then .7z, and .zip again. The window get a little wider, and then back to default size. In different languages, the glitch can have wide effects.
Created attachment 336672 [details] [review] compress-dialog: fix dialog width changes The compress dialog has a width allocation request that can be smaller than the width of description labels in various languages other than english. In order to fix this, use a label widget for each description and group them in a GtkSizeGroup.
Created attachment 336673 [details] [review] compress-dialog: fix dialog width changes The compress dialog has a width allocation request that can be smaller than the width of description labels in various languages other than english. In order to fix this, use a label widget for each description and group them in a GtkSizeGroup.
Created attachment 336674 [details] [review] compress-dialog: fix dialog width changes The compress dialog has a width allocation request that can be smaller than the width of description labels in various languages other than english. In order to fix this, use a label widget for each description and group them in a GtkSizeGroup.
Created attachment 336675 [details] [review] compress-dialog: fix dialog width changes The compress dialog has a width allocation request that can be smaller than the width of description labels in various languages other than english. In order to fix this, use a label widget for each description and group them in a GtkSizeGroup.
Review of attachment 336675 [details] [review]: Thanks for the patch! ::: src/nautilus-compress-dialog-controller.c @@ +290,3 @@ + * otherwise the active child of the description stack cannot be set + */ + gtk_widget_show_all (compress_dialog); Not really, the chidlrens has to be visible, not the dialog. This is wrong because would show the wrong child before changing. Just make the children visible in the .ui file, the actual children that would be displayed is controlled by the stack. ::: src/resources/ui/nautilus-compress-dialog.ui @@ +180,3 @@ </action-widgets> </object> + <object class="GtkSizeGroup"> I just realized GtkStack does this by default. Use the homogeneous property.
Created attachment 336842 [details] [review] compress-dialog: fix dialog width changes The compress dialog has a width allocation request that can be smaller than the width of description labels in various languages other than english. In order to fix this, use a label widget for each description and group them in a GtkSizeGroup.
(In reply to Carlos Soriano from comment #5) > Review of attachment 336675 [details] [review] [review]: > > Thanks for the patch! > > ::: src/nautilus-compress-dialog-controller.c > @@ +290,3 @@ > + * otherwise the active child of the description stack cannot be set > + */ > + gtk_widget_show_all (compress_dialog); > > Not really, the chidlrens has to be visible, not the dialog. This is wrong > because would show the wrong child before changing. > Just make the children visible in the .ui file, the actual children that > would be displayed is controlled by the stack. > Hmm, I must've fooled myself. In my first implementation I tried doing that and for some reason it didn't work. Probably was a mistake of mine somewhere. Works as expected now. > ::: src/resources/ui/nautilus-compress-dialog.ui > @@ +180,3 @@ > </action-widgets> > </object> > + <object class="GtkSizeGroup"> > > I just realized GtkStack does this by default. Use the homogeneous property. Woo, awesome!
Review of attachment 336842 [details] [review]: yes thanks!
update the commit message, the patch no longer uses GtkSizeGroup. Commit after that is changed.
Attachment 336842 [details] pushed as 36e506a - compress-dialog: fix dialog width changes