summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/utils/profile-icon.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/utils/profile-icon.c b/src/utils/profile-icon.c
index e4f8d4d..4284a1d 100644
--- a/src/utils/profile-icon.c
+++ b/src/utils/profile-icon.c
@@ -28,9 +28,15 @@
#include "svg.h"
+#define PROFILE_SVG_WIDTH 16
+#define PROFILE_SVG_HEIGHT 16
+#define STRX(S) #S
+#define STR(S) STRX(S)
static const gchar *profile_svg =
- "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" "
- "viewBox=\"0, 0, 16, 16\">\n"
+ "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\""
+ STR(PROFILE_SVG_WIDTH) "\" height=\"" STR(PROFILE_SVG_HEIGHT)
+ "\" viewBox=\"0, 0, " STR(PROFILE_SVG_WIDTH) ", "
+ STR(PROFILE_SVG_HEIGHT) "\">\n"
"<rect x=\"1\" y=\"9\" width=\"14\" height=\"7\" "
"rx=\"2\" ry=\"2\" fill=\"@COLOR@\" />\n"
"<ellipse cx=\"8\" cy=\"11\" rx=\"7\" ry=\"4\" "
@@ -57,7 +63,8 @@ mq_profile_icon_new_pixbuf(const gchar *color)
RsvgHandle *handle;
GdkPixbuf *pixbuf;
- surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, 16, 16);
+ surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32,
+ PROFILE_SVG_WIDTH, PROFILE_SVG_HEIGHT);
cr = cairo_create(surface);
data = mq_profile_icon_new(color);