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 752805 - Do not show thumbnails for the "small" and "normal" zoom levels in ListView mode
Do not show thumbnails for the "small" and "normal" zoom levels in ListView mode
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: Views: List View
3.16.x
Other Linux
: Normal enhancement
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-07-24 04:02 UTC by Jean-François Fortin Tam
Modified: 2016-03-07 20:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
screenshot (173.35 KB, image/png)
2015-07-24 04:02 UTC, Jean-François Fortin Tam
  Details
screenshot of the proposed look (162.95 KB, image/png)
2015-09-13 18:13 UTC, Jean-François Fortin Tam
  Details
Don't show thumbnails for small zoom levels (2.92 KB, patch)
2016-03-03 21:40 UTC, Alexandru Pandelea
reviewed Details | Review
nautilus-file: Don't show thumbnails for small zoom levels (2.83 KB, patch)
2016-03-04 16:35 UTC, Alexandru Pandelea
none Details | Review
nautilus-file: Don't show thumbnails for small zoom levels (1.84 KB, patch)
2016-03-07 14:27 UTC, Alexandru Pandelea
committed Details | Review

Description Jean-François Fortin Tam 2015-07-24 04:02:01 UTC
Created attachment 308047 [details]
screenshot

With the three new zoom levels in 3.16, when in listview mode it would make sense to only show thumbnails for the "Bigger" zoom level, not the other two.

Instead, please show the normal mimetype icons. They will be a thousand times sharper and more representative for me, reducing psychovisual complexity/clutter and letting my eyes concentrate on the types and filenames.

Attached is a screenshot illustrating the problem, with thumbnails being useless at lower zoom levels and creating visual chaos rather than bringing clarity.
Comment 1 Jean-François Fortin Tam 2015-09-13 18:13:14 UTC
Created attachment 311237 [details]
screenshot of the proposed look

This is how a typical mixed-media folder would look like without micro-thumbnails
Comment 2 Alexandru Pandelea 2016-03-03 21:40:20 UTC
Created attachment 323029 [details] [review]
Don't show thumbnails for small zoom levels

When the zoom level is too small, thumbnails become useless, as they are
so small that they don't give any information.

The solution to this problem is to use mimetype icons when the zoom
level is too small

In order to achieve this, there was added a function that returns
false if the zoom is too small, nautilus_thumbnail_is_limited_by_zoom.
Therefore, if it returns false, the mimetype icon will be used.
Comment 3 Carlos Soriano 2016-03-04 11:06:20 UTC
Review of attachment 323029 [details] [review]:

Thanks for the patch, it works well for the common case (once the comments below are fixed that can cause problems).

Also, I would like designers input on this. Can you ask Allan Day (aday) who is the mainly Nautilus designer on the #gnome-design irc channel?

::: libnautilus-private/nautilus-file.c
@@ +4582,3 @@
 
+gboolean nautilus_thumbnail_is_limited_by_zoom (int size, int scale,
+						 NautilusFileIconFlags flags)

the code style doesn't follow other functions in nautilus where the return type is in a different line than the function name.
Also the aligment of the parameters is wrong. 
The return value is misleading with the title, you return TRUE when it can actually do thumbnail, not when is limited. The return value should be the opossite.

@@ +4590,3 @@
+	} else {
+		zoom_level = size * scale *
+			     cached_thumbnail_size / NAUTILUS_CANVAS_ICON_SIZE_SMALL;

why is this distinction necessary and why multiplication with the cached thumbnails size?

::: libnautilus-private/nautilus-file.h
@@ +211,3 @@
 gboolean                nautilus_file_should_show_thumbnail             (NautilusFile                   *file);
 gboolean                nautilus_file_should_show_directory_item_count  (NautilusFile                   *file);
+gboolean 		 nautilus_thumbnail_is_limited_by_zoom		 (int 				 size,

wrong aligment of the function, you are using tabs, use spaces.
Comment 4 Alexandru Pandelea 2016-03-04 15:18:37 UTC
Sure, I'll ask Allan Day what he thinks about this :)

You're right about the return type, I'll switch the true and false and also fix the alignments.

I've looked again on the code and that distinction is not really necessary. I thought that for some values the size * scale is not equal to the zoom level, but that's not true. So, I'll also remove the else.
Comment 5 Alexandru Pandelea 2016-03-04 16:35:25 UTC
Created attachment 323107 [details] [review]
nautilus-file: Don't show thumbnails for small zoom levels

When the zoom level is too small, thumbnails become useless, as they are
so small that they don't give any information.

The solution to this problem is to use mimetype icons when the zoom
level is too small

In order to achieve this, there was added a function that returns
true if the zoom is too small, nautilus_thumbnail_is_limited_by_zoom,
meaning that the corresponding mimetype icon should be used instead
of the thumbnail
Comment 6 Carlos Soriano 2016-03-06 21:18:27 UTC
Review of attachment 323107 [details] [review]:

Now everything looks mostly good, thanks!
A few nitpicks below:

::: libnautilus-private/nautilus-file.c
@@ +4581,3 @@
 }
 
+gboolean

since we use it only here, declare it as static gboolean.

::: libnautilus-private/nautilus-file.h
@@ +212,3 @@
 gboolean                nautilus_file_should_show_directory_item_count  (NautilusFile                   *file);
+gboolean                nautilus_thumbnail_is_limited_by_zoom           (int                            size,
+                                                                        int                             scale);

Functions are only needed in the header if they are public. In this case we only use it internally, so you can remove this. Sorry for not caching this up before.
Comment 7 Alexandru Pandelea 2016-03-07 14:27:54 UTC
Created attachment 323281 [details] [review]
nautilus-file: Don't show thumbnails for small zoom levels

When the zoom level is too small, thumbnails become useless, as they are
so small that they don't give any information.

The solution to this problem is to use mimetype icons when the zoom
level is too small

In order to achieve this, there was added a function that returns
true if the zoom is too small, nautilus_thumbnail_is_limited_by_zoom,
meaning that the corresponding mimetype icon should be used instead
of the thumbnail
Comment 8 Carlos Soriano 2016-03-07 15:42:38 UTC
Review of attachment 323281 [details] [review]:

LGTM thanks!
Comment 9 Carlos Soriano 2016-03-07 20:10:42 UTC
Attachment 323281 [details] pushed as 52dd77c - nautilus-file: Don't show thumbnails for small zoom levels