mirror of
https://gitlab.gnome.org/GNOME/nautilus
synced 2024-06-30 23:46:35 +00:00
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.
This commit is contained in:
parent
7b251f0945
commit
8cf4113d70
|
@ -5340,7 +5340,7 @@ nautilus_thumbnail_is_limited_by_zoom (int size,
|
|||
|
||||
zoom_level = size * scale;
|
||||
|
||||
if (zoom_level <= NAUTILUS_LIST_ICON_SIZE_STANDARD)
|
||||
if (zoom_level < NAUTILUS_THUMBNAIL_MINIMUM_ICON_SIZE)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -92,6 +92,8 @@ typedef enum {
|
|||
NAUTILUS_FILE_ICON_FLAGS_USE_ONE_EMBLEM = (1<<7)
|
||||
} NautilusFileIconFlags;
|
||||
|
||||
#define NAUTILUS_THUMBNAIL_MINIMUM_ICON_SIZE 48
|
||||
|
||||
/* Standard Drag & Drop types. */
|
||||
typedef enum {
|
||||
NAUTILUS_ICON_DND_GNOME_ICON_LIST,
|
||||
|
|
Loading…
Reference in New Issue
Block a user