[nautilus/wip/antoniof/gtk4-preparation-drop-libgd: 7/11] file: Add constant for minimum size to use

commit 8cf4113d701efc30ac1e5e502f16138df144592a
Author: António Fernandes <antoniof gnome org>
Date:   Mon Nov 1 22:26:52 2021 +0000

    file: Add constant for minimum size to use
    Currently, list view doesn't use thumbnails for its first zoom levels:
    SMALL (16px) and STANDARD (32px). So, it does display thumbnails for
    LARGE (48px) and LARGER (64px). On the other hand, the icon view uses
    displays for all zoom levels, the smallest being 48px.
    In short: thumbnails are displayed for zoom levels that request an
    icon size of 48 logical pixels. So, the minumum size of thumbs is 48px.
    This is implemented by checking that the current icon size is equal to
    or lower than NAUTILUS_LIST_ICON_SIZE_STANDARD (32px).
    However, we are going to need to check this condition in other places,
    so it would be best to have a constant specifically for this purpose.
    For the sake of naming this constant reasonably, let's use the minumum
    size of 48px and update the condition checking accordingly.

 src/nautilus-file.c | 2 +-
 src/nautilus-file.h | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/nautilus-file.c b/src/nautilus-file.c
index d0a9a8d03..3f5d1399c 100644
--- a/src/nautilus-file.c
+++ b/src/nautilus-file.c
@@ -5340,7 +5340,7 @@ nautilus_thumbnail_is_limited_by_zoom (int size,
     zoom_level = size * scale;
-    if (zoom_level <= NAUTILUS_LIST_ICON_SIZE_STANDARD)
         return TRUE;
diff --git a/src/nautilus-file.h b/src/nautilus-file.h
index 6946be5f8..7c966389b 100644
--- a/src/nautilus-file.h
+++ b/src/nautilus-file.h
@@ -92,6 +92,8 @@ typedef enum {
 } NautilusFileIconFlags;       
 /* Standard Drag & Drop types. */
 typedef enum {

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]