]> Dogcows Code - chaz/tint2/commitdiff
adjust saturation/brightness on task icon
authorThierry Lorthiois <lorthiois@bbsoft.fr>
Sat, 29 Aug 2009 12:00:11 +0000 (12:00 +0000)
committerThierry Lorthiois <lorthiois@bbsoft.fr>
Sat, 29 Aug 2009 12:00:11 +0000 (12:00 +0000)
ChangeLog
configure.ac
src/Makefile.am
src/taskbar/task.c
src/util/common.h

index 92b13501ce8e32e4dcc9d1f96689d6e12fb6ff0d..ef853c0e95aa547dedc6721cf54de5a8b89d4e19 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+2009-08-29
+- adjust saturation/brightness on task icon
+
 2009-08-29
 - merge change described in issue 122 (by jackp)
   made right click easier
index 01f1b96d8036ce51cecf626ac6dc36f77a9f2d64..4a2f5d31fff49732e987a647a1c3be5d76ade323 100644 (file)
@@ -1,6 +1,6 @@
 #                                               -*- Autoconf -*-
 # Process this file with autoconf to produce a configure script.
-AC_INIT([tint2], [9.9.9-svn], [http://code.google.com/p/tint2/issues])
+AC_INIT([tint2], [0.7.9-svn], [http://code.google.com/p/tint2/issues])
 
 AM_INIT_AUTOMAKE
 
index 636136683a7bd8747d7a7c67a7e1fc698f99fa01..7441734c8ca514e2ed6cbe5dd17c84fcb555eb8e 100644 (file)
@@ -10,6 +10,7 @@ bin_PROGRAMS = tint2
 tint2_SOURCES = config.c \
                                util/area.h \
                                util/common.h \
+                               util/common.c \
                                util/area.c \
                                util/window.h \
                                util/window.c \
@@ -26,7 +27,7 @@ tint2_SOURCES = config.c \
                                taskbar/taskbar.c \
                                taskbar/task.c \
                                taskbar/taskbar.h \
-                               taskbar/task.h 
+                               taskbar/task.h
 
 if ENABLE_BATTERY
 DEFS += -DENABLE_BATTERY
index e7314ed443cb224a68202b9e06e7bd595459b2b6..ff0bd500ddca9a7d07e75d3825e7097c85a97277 100644 (file)
@@ -238,6 +238,12 @@ void get_icon (Task *tsk)
        tsk->icon_data_active = malloc (tsk->icon_width * tsk->icon_height * sizeof (DATA32));
        memcpy (tsk->icon_data_active, tsk->icon_data, tsk->icon_width * tsk->icon_height * sizeof (DATA32));
 
+       if (panel->g_task.hue != 0 || panel->g_task.saturation != 0 || panel->g_task.brightness != 0) {
+               adjust_hsb(tsk->icon_data, tsk->icon_width, tsk->icon_height, (float)panel->g_task.hue/100, (float)panel->g_task.saturation/100, (float)panel->g_task.brightness/100);
+       }
+       if (panel->g_task.hue_active != 0 || panel->g_task.saturation_active != 0 || panel->g_task.brightness_active != 0) {
+               adjust_hsb(tsk->icon_data_active, tsk->icon_width, tsk->icon_height, (float)panel->g_task.hue_active/100, (float)panel->g_task.saturation_active/100, (float)panel->g_task.brightness_active/100);
+       }
 }
 
 
index e874ba6d8627e8a4a505da6443a4eb372e798c6c..bb67481d9af66dae501b3510828b9e26b34eb764 100644 (file)
@@ -32,9 +32,6 @@ enum { NONE=0, CLOSE, TOGGLE, ICONIFY, SHADE, TOGGLE_ICONIFY, MAXIMIZE_RESTORE,
 
 #define ALLDESKTOP  0xFFFFFFFF
 
-#define MIN3(x,y,z)  ((y) <= (z) ? ((x) <= (y) ? (x) : (y)) : ((x) <= (z) ? (x) : (z)))
-#define MAX3(x,y,z)  ((y) >= (z) ? ((x) >= (y) ? (x) : (y)) : ((x) >= (z) ? (x) : (z)))
-
 
 typedef struct config_border
 {
@@ -52,6 +49,9 @@ typedef struct config_color
 } config_color;
 
 
+// adjust HSB on an ARGB icon
+void adjust_hsb(unsigned int *data, int w, int h, float hue, float satur, float bright);
+
 
 
 #endif
This page took 0.023007 seconds and 4 git commands to generate.