summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2014-07-31 17:13:04 +0200
committerMatthias Clasen <mclasen@redhat.com>2014-08-03 02:46:38 +0200
commit05492d10bdafb9ea874c4aab9eb77ca20e0ab3e0 (patch)
tree50c2ec37fe5ade434064a69a7ba7ea3b2a76ae60
parent8146d6aafeb595a66c0dbec2a0ad96a81e9a8fa7 (diff)
downloadadwaita-icon-theme-05492d10bdafb9ea874c4aab9eb77ca20e0ab3e0.tar.gz
Support pre-rendered symbolic pngs
This uses the new gtk-encode-symbolic-svg feature of Gtk to pre-render svgs as recolorable pngs. The pngs are loaded faster and can be used without librsvg which avoids librsvg as the required dependencies for Gtk+. https://bugzilla.gnome.org/show_bug.cgi?id=730450
-rw-r--r--configure.ac7
-rw-r--r--src/symbolic/Makefile.am4
2 files changed, 11 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 9d7ddebc5..bd0b7062d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -51,6 +51,13 @@ if test "x$INKSCAPE" = "xfalse"; then
fi
AM_CONDITIONAL(ALLOW_RENDERING, test "x$allow_rendering" = "xyes")
+symbolic_encode_sizes="16x16 32x32 48x48 64x64 96x96"
+AC_PATH_PROG([GTK_ENCODE_SYMBOLIC_SVG], [gtk-encode-symbolic-svg], [false])
+if test "x$GTK_ENCODE_SYMBOLIC_SVG" = "xfalse"; then
+ symbolic_encode_sizes=""
+fi
+AC_SUBST(symbolic_encode_sizes)
+
AC_CONFIG_FILES([
Makefile
adwaita-icon-theme.pc
diff --git a/src/symbolic/Makefile.am b/src/symbolic/Makefile.am
index db16088da..9300bce7e 100644
--- a/src/symbolic/Makefile.am
+++ b/src/symbolic/Makefile.am
@@ -32,6 +32,10 @@ install-data-local:
context="`dirname $$file`"; \
$(mkdir_p) $(DESTDIR)$(themedir)/scalable/$$context; \
$(install_sh_DATA) $(top_srcdir)/$(SVGOUTDIR)/scalable/$$file $(DESTDIR)$(themedir)/scalable/$$file; \
+ for size in $(symbolic_encode_sizes); do \
+ $(mkdir_p) $(DESTDIR)$(themedir)/$$size/$$context; \
+ $(GTK_ENCODE_SYMBOLIC_SVG) $(top_srcdir)/$(SVGOUTDIR)/scalable/$$file $$size -o $(DESTDIR)$(themedir)/$$size/$$context; \
+ done \
done
uninstall-local: