diff options
| author | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2018-12-15 21:51:57 +0100 |
|---|---|---|
| committer | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2018-12-15 21:51:57 +0100 |
| commit | 193f6b753ebb44e7a7b19a034e632f4236bbba66 (patch) | |
| tree | cbed44d2f5b661375704fc244924dcd4689c0e09 /src | |
| parent | ea811026c7f88925703a26778f7b739549896abf (diff) | |
| download | cataract-193f6b753ebb44e7a7b19a034e632f4236bbba66.tar.xz | |
theming: Add option to disable HiDPI for any particular image size
Useful for 4k size where additional HiDPI sizes (i.e. 6k and 8k) are
overkill to generate and aren't very common on the market yet.
Diffstat (limited to 'src')
| -rw-r--r-- | src/setup.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/setup.c b/src/setup.c index 85c7326..9dedd77 100644 --- a/src/setup.c +++ b/src/setup.c @@ -200,6 +200,7 @@ parse_design_setup_xml (const gchar *filename) TGalleryDesignTheme *theme; int count, c; int i, j; + gboolean no_hidpi; xml = xml_parser_load (filename); if (xml == NULL) @@ -309,8 +310,12 @@ parse_design_setup_xml (const gchar *filename) image_size->quality_threshold = xml_file_get_node_attribute_long_with_default (xml, s, "quality", DEFAULT_QUALITY_THRESHOLD); g_free (s); + s = g_strdup_printf ("/design_setup/image_sizes/size[%d]/no_hidpi", i + 1); + no_hidpi = xml_file_get_node_present (xml, s); + g_free (s); + /* Generate HiDPI sizes */ - if (design->hidpi_sizes) + if (design->hidpi_sizes && !no_hidpi) for (j = 0; design->hidpi_sizes[j] != 0; j++ ) { hidpi_image_size = g_malloc0 (sizeof (TImageSize)); memcpy (hidpi_image_size, image_size, sizeof (TImageSize)); |
