all repos — tint2 @ 8eb1d35fc80e519e1740c3c7aba1d3dae8541595

fork of the tint2 desktop panel for my custom setup - only minimized windows across all desktops for the taskbar

adjust saturation/brightness on task icon

git-svn-id: http://tint2.googlecode.com/svn/trunk@160 121b4492-b84c-0410-8b4c-0d4edfb3f3cc
lorthiois@bbsoft.fr lorthiois@bbsoft.fr@121b4492-b84c-0410-8b4c-0d4edfb3f3cc
commit

8eb1d35fc80e519e1740c3c7aba1d3dae8541595

parent

3d37d78100c18310d9d7c8bfc40b0e86bb37539b

5 files changed, 15 insertions(+), 5 deletions(-)

jump to
M ChangeLogChangeLog

@@ -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
M configure.acconfigure.ac

@@ -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
M src/Makefile.amsrc/Makefile.am

@@ -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 @@ systray/systraybar.c \

taskbar/taskbar.c \ taskbar/task.c \ taskbar/taskbar.h \ - taskbar/task.h + taskbar/task.h if ENABLE_BATTERY DEFS += -DENABLE_BATTERY
M src/taskbar/task.csrc/taskbar/task.c

@@ -238,6 +238,12 @@

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); + } }
M src/util/common.hsrc/util/common.h

@@ -32,9 +32,6 @@ enum { NONE=0, CLOSE, TOGGLE, ICONIFY, SHADE, TOGGLE_ICONIFY, MAXIMIZE_RESTORE, 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 {

@@ -51,6 +48,9 @@ double color[3];

double alpha; } config_color; + +// adjust HSB on an ARGB icon +void adjust_hsb(unsigned int *data, int w, int h, float hue, float satur, float bright);