hi, I wanted to get bigger icons in my taskbars, but to just have someting wich looks more "heavy metal" (means more cool than cool itself) I added a piece of code to simulate a pressed button, try it with some buttons having border set to false « border="false" »
in traybutton.c, at the draw function
/** Draw a tray button. */
void Draw(TrayComponentType *cp, int active)
{
ButtonNode button;
TrayButtonType *bp;
int labelx;
bp = (TrayButtonType*)cp->object;
JXSetForeground(display, rootGC, colors[COLOR_TRAY_BG]);
JXFillRectangle(display, cp->pixmap, rootGC, 0, 0, cp->width, cp->height);
ResetButton(&button, cp->pixmap, rootGC);
if(active) {
button.type = BUTTON_TRAY_ACTIVE;
} else {
button.border = bp->border;
button.type = BUTTON_TRAY;
}
button.width = cp->width - 3;
button.height = cp->height - 3;
button.x = 1;
button.y = 1;
DrawButton(&button);
/* Compute the offset of the text. */
if(bp->label) {
if(!bp->icon) {
labelx = 2 + cp->width / 2;
labelx -= GetStringWidth(FONT_TRAYBUTTON, bp->label) / 2;
} else {
labelx = cp->width;
labelx -= GetStringWidth(FONT_TRAYBUTTON, bp->label) + 4;
}
} else {
labelx = cp->width;
}
labelx -= BUTTON_SIZE;
if(bp->border==0){/nicoo/ // borderless
if(bp->icon) { /nicoo/
switch(button.type){ /nicoo/
case BUTTON_TRAY_ACTIVE : /nicoo/
PutIcon(bp->icon, cp->pixmap, 1, 1, /nicoo/
cp->width-1, cp->height-1); /nicoo/
break; /nicoo/
default : /*nicoo*/
PutIcon(bp->icon, cp->pixmap, 0, 0, /*nicoo*/
cp->width, cp->height); /*nicoo*/
}
} /*nicoo*/
}else{/*nicoo*/
if(bp->icon) {
PutIcon(bp->icon, cp->pixmap, BUTTON_SIZE, BUTTON_SIZE,
labelx - BUTTON_SIZE, cp->height - BUTTON_SIZE * 2);
}
if(bp->label) {
RenderString(cp->pixmap, FONT_TRAYBUTTON, COLOR_TRAYBUTTON_FG,
labelx + 2,
cp->height / 2 - GetStringHeight(FONT_TRAYBUTTON) / 2,
cp->width - labelx, bp->label);
}
} /nicoo/
}
feel free to reuse, no garantee, I'M NOT A REAL CODER.
I added /nicoo/ to help myself and everydude else to see what I've done, If you want to reuse something, you can remove these comments.
n.b. : I know this is note an issue, but "pull request" seems to be inactivated
n.b. 2 : I made some other minors "hacks" like using icons in border, I also deactivated some stuffs I don't like, examples : having tooltip when I pass over the clock, deactivated many menu functions (I don't like menus) and so. Most of my stuffs are hardcoded so it can be annoying for most dudes.
just for propaganda : http://www.zimagez.com/zimage/capturedcran-20042013-142549.php
\m/ -- nicoo -- \m/