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 772345 - placesviewrow: busy_spinner when visible offsets the rest of the widgets on the row
placesviewrow: busy_spinner when visible offsets the rest of the widgets on t...
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-10-02 19:28 UTC by Daniel Boles
Modified: 2016-10-10 19:14 UTC
See Also:
GNOME target: ---
GNOME version: 3.21/3.22


Attachments
screenshot of busy_spinner causing rest of row to get offset from other rows (43.00 KB, image/png)
2016-10-02 19:28 UTC, Daniel Boles
Details

Description Daniel Boles 2016-10-02 19:28:52 UTC
Created attachment 336768 [details]
screenshot of busy_spinner causing rest of row to get offset from other rows

The eject_button is hidden using its child-visible property of the containing GtkBox. However, the busy_spinner is hidden just using gtk_widget_set_visible.

The upshot of this is that, while the busy_spinner is visible, it requests size that wasn't previously allocated in the box. This causes the rest of the placesviewrow, to the left, to be offset. So, the path and capacity labels get shifted noticeably compared to other rows above/below which are not marked busy. See the attached screenshot for a demo of this.

This is noted in the source for the eject_button:

>294       /*
>295        * When we hide the eject button, no size is allocated for it. Since
>296        * we want to have alignment between rows, it needs an empty space
>297        * when the eject button is not available. So, call then
>298        * gtk_widget_set_child_visible(), which makes the button allocate the
>299        * size but it stays hidden when needed.
>300        */                                     

...so the simplest solution is to do the same thing for the busy_spinner..

Alternatively, we could put the eject_button and busy_spinner in a stack, since - AFAICT - they are mutually exclusive anyway, right? Doing this will ensure that there is always the same amount of space reserved in the row, while not taking up space for a spinner that is only there a fraction of the time.

I'll try to implement and submit patches for both options, unless someone on the team really wants to beat me to it. :)
Comment 1 Ernestas Kulik 2016-10-02 19:32:20 UTC

*** This bug has been marked as a duplicate of bug 771161 ***
Comment 2 Ernestas Kulik 2016-10-02 19:34:25 UTC
Oops, my bad. Those two are separate (albeit related) issues.
Comment 3 Ernestas Kulik 2016-10-02 19:35:56 UTC
*facepalm*

Sorry again… My reading apprehension has reached unprecedented lows.

*** This bug has been marked as a duplicate of bug 771161 ***
Comment 4 Daniel Boles 2016-10-02 20:28:00 UTC
I know the feeling. I've submitted my patch there!