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 671691 - too much white space around thumbnails
too much white space around thumbnails
Status: RESOLVED FIXED
Product: evince
Classification: Core
Component: general
3.2.x
Other Linux
: Normal enhancement
: ---
Assigned To: Evince Maintainers
Evince Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-03-09 02:44 UTC by thekswenson
Modified: 2012-10-01 07:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fixes the padding issue (1.66 KB, patch)
2012-07-04 20:28 UTC, Kim Nguyễn
none Details | Review

Description thekswenson 2012-03-09 02:44:54 UTC
1. open a pdf document.
2. see that the thumbnails are not centered because there is too much whitespace around them.
3. when scrolling to a new page see that the thumbnails "dance".

(see the attached video)

this is a regression
there should be very little whitespace around the thumbnails.
Comment 1 André Klapper 2012-03-09 10:54:20 UTC
No video attached, and no idea which thumbnails this refers to. :)
Comment 2 thekswenson 2012-03-09 15:48:47 UTC
I refer to the thumbnails in the Side Pane.  Video at:
http://youtu.be/iWqlYYyMUF4
Comment 3 Kim Nguyễn 2012-07-04 20:28:32 UTC
Created attachment 218050 [details] [review]
Fixes the padding issue

Hi. This is really silly. I'm attaching a patch against 3.4 (applies also cleanly on master but I could not compile it since I don't have a recent enough poppler-glib on my system).

This fixes the padding issue. When the GtkIconView is refilled, just find the width of the largest thumbnail and uses that (+10 pixels) as item width for the
GtkIconView.

I've tested with several columns, with several width of thumbnails and with PDFs containing pages of different widths.

I'm not sure I'm catching all the cases where the width should be changed though.
Comment 4 Germán Poo-Caamaño 2012-09-14 07:51:04 UTC
(In reply to comment #3)
> [...] 
> Hi. This is really silly. I'm attaching a patch against 3.4 (applies also
> cleanly on master but I could not compile it since I don't have a recent enough
> poppler-glib on my system).

If you want to try evince master and you have jhbuild, plus the development
packages, try the following:

$ wget http://people.gnome.org/~gpoo/build/evince/jhbuildrc-evince
$ jhbuild -f jhbuildrc-evince

That would grab, compile and install locally a newer glib, poppler and evince.
Comment 5 Germán Poo-Caamaño 2012-09-14 07:55:26 UTC
Review of attachment 218050 [details] [review]:

I tried it with master and it seems to work fine.  There is a detail with the hard code padding.  I think it would be better if that padding were defined elsewhere.

FWIW, this is useful when you only have thumbnails (or mainly using them).  It saves a lot of space (useful for displaying the document),  When using annotation, more space in the sidebar would be needed.

::: shell/ev-sidebar-thumbnails.c
@@ +756,3 @@
+
+                };
+                gtk_icon_view_set_item_width(GTK_ICON_VIEW(priv->icon_view), max_icon_width + 10);

That padding should be defined in a header, at least.  IMHO, it should follow the padding described in the HIG (12, 24, etc.).  I tried with 24 and I liked it.
Comment 6 Germán Poo-Caamaño 2012-10-01 07:00:01 UTC
(In reply to comment #5)
> Review of attachment 218050 [details] [review]:
> 
> I tried it with master and it seems to work fine.  There is a detail with the
> hard code padding.  I think it would be better if that padding were defined
> elsewhere.
> [...]

The problem exists in 3.4.0, but not in 3.6.0.  I realized I tried in 
wip/annotations branch, which is some months old.

I am closing this bug as fixed in stable.  If you can reproduce it with
3.6.0, please feel free to re-open it and add more details on how to
reproduce it.