After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 771435 - slight ui glitch in compress window when switching extension
slight ui glitch in compress window when switching extension
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: general
3.21.x
Other Linux
: Normal normal
: 3.22
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-09-14 15:41 UTC by Mohammed Sadiq
Modified: 2016-10-04 20:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
compress-dialog: fix dialog width changes (8.32 KB, patch)
2016-09-30 13:57 UTC, Razvan Chitu
none Details | Review
compress-dialog: fix dialog width changes (8.37 KB, patch)
2016-09-30 14:01 UTC, Razvan Chitu
none Details | Review
compress-dialog: fix dialog width changes (8.67 KB, patch)
2016-09-30 14:02 UTC, Razvan Chitu
none Details | Review
compress-dialog: fix dialog width changes (8.67 KB, patch)
2016-09-30 14:03 UTC, Razvan Chitu
none Details | Review
compress-dialog: fix dialog width changes (7.74 KB, patch)
2016-10-03 21:49 UTC, Razvan Chitu
committed Details | Review

Description Mohammed Sadiq 2016-09-14 15:41:25 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.
Comment 1 Razvan Chitu 2016-09-30 13:57:30 UTC
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.
Comment 2 Razvan Chitu 2016-09-30 14:01:54 UTC
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.
Comment 3 Razvan Chitu 2016-09-30 14:02:56 UTC
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.
Comment 4 Razvan Chitu 2016-09-30 14:03:54 UTC
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.
Comment 5 Carlos Soriano 2016-10-03 08:25:59 UTC
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.
Comment 6 Razvan Chitu 2016-10-03 21:49:04 UTC
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.
Comment 7 Razvan Chitu 2016-10-03 21:50:22 UTC
(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!
Comment 8 Carlos Soriano 2016-10-04 20:21:07 UTC
Review of attachment 336842 [details] [review]:

yes thanks!
Comment 9 Carlos Soriano 2016-10-04 20:21:44 UTC
update the commit message, the patch no longer uses GtkSizeGroup. Commit after that is changed.
Comment 10 Razvan Chitu 2016-10-04 20:23:29 UTC
Attachment 336842 [details] pushed as 36e506a - compress-dialog: fix dialog width changes