view-icon: add new zoom level

With the flow box we can finally add more zoom levels. Add a new larger
one so the user can view larger content.
parent 1add4a1b
......@@ -37,6 +37,7 @@
<value value="1" nick="standard"/>
<value value="2" nick="large"/>
<value value="3" nick="larger"/>
<value value="4" nick="largest"/>
</enum>
<enum id="org.gnome.nautilus.ListZoomLevel">
......
......@@ -3954,7 +3954,7 @@ thumbnail_loader_size_prepared (GdkPixbufLoader *loader,
aspect_ratio = ((double) width) / height;
/* cf. nautilus_file_get_icon() */
max_thumbnail_size = NAUTILUS_CANVAS_ICON_SIZE_LARGER * cached_thumbnail_size / NAUTILUS_CANVAS_ICON_SIZE_SMALL;
max_thumbnail_size = NAUTILUS_CANVAS_ICON_SIZE_LARGEST * cached_thumbnail_size / NAUTILUS_CANVAS_ICON_SIZE_SMALL;
if (MAX (width, height) > max_thumbnail_size)
{
if (width > height)
......
......@@ -15,6 +15,7 @@ typedef enum {
NAUTILUS_CANVAS_ZOOM_LEVEL_STANDARD,
NAUTILUS_CANVAS_ZOOM_LEVEL_LARGE,
NAUTILUS_CANVAS_ZOOM_LEVEL_LARGER,
NAUTILUS_CANVAS_ZOOM_LEVEL_LARGEST,
} NautilusCanvasZoomLevel;
typedef enum {
......@@ -25,7 +26,7 @@ typedef enum {
} NautilusListZoomLevel;
#define NAUTILUS_LIST_ZOOM_LEVEL_N_ENTRIES (NAUTILUS_LIST_ZOOM_LEVEL_LARGER + 1)
#define NAUTILUS_CANVAS_ZOOM_LEVEL_N_ENTRIES (NAUTILUS_CANVAS_ZOOM_LEVEL_LARGER + 1)
#define NAUTILUS_CANVAS_ZOOM_LEVEL_N_ENTRIES (NAUTILUS_CANVAS_ZOOM_LEVEL_LARGEST + 1)
/* Nominal icon sizes for each Nautilus zoom level.
* This scheme assumes that icons are designed to
......@@ -42,6 +43,7 @@ typedef enum {
#define NAUTILUS_CANVAS_ICON_SIZE_STANDARD 64
#define NAUTILUS_CANVAS_ICON_SIZE_LARGE 96
#define NAUTILUS_CANVAS_ICON_SIZE_LARGER 128
#define NAUTILUS_CANVAS_ICON_SIZE_LARGEST 256
/* Maximum size of an icon that the icon factory will ever produce */
#define NAUTILUS_ICON_MAXIMUM_SIZE 320
......
......@@ -445,7 +445,7 @@ real_bump_zoom_level (NautilusFilesView *files_view,
new_level = self->zoom_level + zoom_increment;
if (new_level >= NAUTILUS_CANVAS_ZOOM_LEVEL_SMALL &&
new_level <= NAUTILUS_CANVAS_ZOOM_LEVEL_LARGER)
new_level <= NAUTILUS_CANVAS_ZOOM_LEVEL_LARGEST)
{
g_action_group_change_action_state (self->action_group,
"zoom-to-level",
......@@ -481,6 +481,12 @@ get_icon_size_for_zoom_level (NautilusCanvasZoomLevel zoom_level)
return NAUTILUS_CANVAS_ICON_SIZE_LARGER;
}
break;
case NAUTILUS_CANVAS_ZOOM_LEVEL_LARGEST:
{
return NAUTILUS_CANVAS_ICON_SIZE_LARGEST;
}
break;
}
g_return_val_if_reached (NAUTILUS_CANVAS_ICON_SIZE_STANDARD);
}
......
......@@ -131,7 +131,7 @@ nautilus_view_item_model_class_init (NautilusViewItemModelClass *klass)
"Icon size",
"The size in pixels of the icon",
NAUTILUS_CANVAS_ICON_SIZE_SMALL,
NAUTILUS_CANVAS_ICON_SIZE_LARGER,
NAUTILUS_CANVAS_ICON_SIZE_LARGEST,
NAUTILUS_CANVAS_ICON_SIZE_LARGE,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
g_object_class_install_property (object_class,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment