[adwaita-icon-theme] Support pre-rendered symbolic pngs



commit 05492d10bdafb9ea874c4aab9eb77ca20e0ab3e0
Author: Alexander Larsson <alexl redhat com>
Date:   Thu Jul 31 17:13:04 2014 +0200

    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

 configure.ac             |    7 +++++++
 src/symbolic/Makefile.am |    4 ++++
 2 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 9d7ddeb..bd0b706 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 db16088..9300bce 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:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]