diff options
author | Přemysl Eric Janouch <p@janouch.name> | 2021-12-28 01:05:07 +0100 |
---|---|---|
committer | Přemysl Eric Janouch <p@janouch.name> | 2021-12-28 02:07:42 +0100 |
commit | 720464327c1bc69297b21b70918cc93624be1dd0 (patch) | |
tree | 902f53a4301b051b8bb0a90848603b4f7d6d860d /fiv-browser.c | |
parent | ad1ff06aff068bb260c0b957c5257acb1d117caf (diff) | |
download | fiv-720464327c1bc69297b21b70918cc93624be1dd0.tar.gz fiv-720464327c1bc69297b21b70918cc93624be1dd0.tar.xz fiv-720464327c1bc69297b21b70918cc93624be1dd0.zip |
Clean up
Diffstat (limited to 'fiv-browser.c')
-rw-r--r-- | fiv-browser.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/fiv-browser.c b/fiv-browser.c index ab085f7..84828d2 100644 --- a/fiv-browser.c +++ b/fiv-browser.c @@ -66,8 +66,6 @@ typedef struct entry Entry; typedef struct item Item; typedef struct row Row; -static const double g_permitted_width_multiplier = 2; - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - struct entry { @@ -305,8 +303,8 @@ rescale_thumbnail(cairo_surface_t *thumbnail, double row_height) double scale_x = 1; double scale_y = 1; - if (width > g_permitted_width_multiplier * height) { - scale_x = g_permitted_width_multiplier * 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; @@ -823,8 +821,9 @@ fiv_browser_get_preferred_width(GtkWidget *widget, gint *minimum, gint *natural) GtkBorder padding = {}; gtk_style_context_get_padding(style, GTK_STATE_FLAG_NORMAL, &padding); - *minimum = *natural = g_permitted_width_multiplier * self->item_height + - padding.left + 2 * self->item_border_x + padding.right; + *minimum = *natural = + FIV_IO_WIDE_THUMBNAIL_COEFFICIENT * self->item_height + padding.left + + 2 * self->item_border_x + padding.right; } static void |