aboutsummaryrefslogtreecommitdiff
path: root/fiv-io.c
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2021-12-28 01:05:07 +0100
committerPřemysl Eric Janouch <p@janouch.name>2021-12-28 02:07:42 +0100
commit720464327c1bc69297b21b70918cc93624be1dd0 (patch)
tree902f53a4301b051b8bb0a90848603b4f7d6d860d /fiv-io.c
parentad1ff06aff068bb260c0b957c5257acb1d117caf (diff)
downloadfiv-720464327c1bc69297b21b70918cc93624be1dd0.tar.gz
fiv-720464327c1bc69297b21b70918cc93624be1dd0.tar.xz
fiv-720464327c1bc69297b21b70918cc93624be1dd0.zip
Clean up
Diffstat (limited to 'fiv-io.c')
-rw-r--r--fiv-io.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/fiv-io.c b/fiv-io.c
index dea5de9..eed6dfb 100644
--- a/fiv-io.c
+++ b/fiv-io.c
@@ -2763,9 +2763,6 @@ FivIoThumbnailSizeInfo
FIV_IO_THUMBNAIL_SIZES(XX)};
#undef XX
-// TODO(p): Put the constant in a header file, share with fiv-browser.c.
-static const double g_wide_thumbnail_factor = 2;
-
static void
mark_thumbnail_lq(cairo_surface_t *surface)
{
@@ -2793,8 +2790,8 @@ rescale_thumbnail(cairo_surface_t *thumbnail, double row_height)
double scale_x = 1;
double scale_y = 1;
- if (width > g_wide_thumbnail_factor * height) {
- scale_x = g_wide_thumbnail_factor * row_height / width;
+ if (width > FIV_IO_WIDE_THUMBNAIL_COEFFICIENT * height) {
+ scale_x = FIV_IO_WIDE_THUMBNAIL_COEFFICIENT * row_height / width;
scale_y = round(scale_x * height) / height;
} else {
scale_y = row_height / height;