From a5345e807e229ee9e0e2f4bcb148aab0e7216e22 Mon Sep 17 00:00:00 2001 From: Christoph Gysin Date: Mon, 25 Jan 2016 22:44:27 +0200 Subject: extract cairo_set_source_u32() --- swaybar/CMakeLists.txt | 6 ++++++ swaybar/render.c | 9 +-------- 2 files changed, 7 insertions(+), 8 deletions(-) (limited to 'swaybar') diff --git a/swaybar/CMakeLists.txt b/swaybar/CMakeLists.txt index 60975f40..5b865083 100644 --- a/swaybar/CMakeLists.txt +++ b/swaybar/CMakeLists.txt @@ -25,6 +25,12 @@ target_link_libraries(swaybar ${JSONC_LIBRARIES} ) +if (WITH_GDK_PIXBUF) + include_directories( + ${GDK_PIXBUF_INCLUDE_DIRS} + ) +endif() + install( TARGETS swaybar RUNTIME diff --git a/swaybar/render.c b/swaybar/render.c index ce5d10b4..1573a373 100644 --- a/swaybar/render.c +++ b/swaybar/render.c @@ -2,6 +2,7 @@ #include #include +#include "client/cairo.h" #include "client/pango.h" #include "client/window.h" #include "bar/config.h" @@ -15,14 +16,6 @@ static int ws_horizontal_padding = 5; static double ws_vertical_padding = 1.5; static int ws_spacing = 1; -static void cairo_set_source_u32(cairo_t *cairo, uint32_t color) { - cairo_set_source_rgba(cairo, - ((color & 0xFF000000) >> 24) / 255.0, - ((color & 0xFF0000) >> 16) / 255.0, - ((color & 0xFF00) >> 8) / 255.0, - (color & 0xFF) / 255.0); -} - /** * Renders a sharp line of any width and height. * -- cgit v1.2.3