if window doesn't have an icon, use full width for title
authorMikael Magnusson <mikachu@comhem.se>
Thu, 7 Jun 2007 19:27:55 +0000 (19:27 +0000)
committerMikael Magnusson <mikachu@comhem.se>
Thu, 7 Jun 2007 19:27:55 +0000 (19:27 +0000)
configure
gui.c
icon.xpm [deleted file]

index 724a750..7257828 100755 (executable)
--- a/configure
+++ b/configure
@@ -39,14 +39,13 @@ echo -n "creating Makefile... "
 
 SOURCES="gui.c  icon.c  rspanel.c  xprop.c"
 HEADERS="dims.h  gui.h  icon.h  rspanel.h  xprop.h"
-DATA="icon.xpm"
 
 echo CC="$CC" > Makefile
 echo CFLAGS="$CFLAGS `pkg-config $FOUND --cflags` -g3" >> Makefile
 echo LDFLAGS="`pkg-config $FOUND --libs`" >> Makefile
 echo PROGNAME="$PROGNAME" >> Makefile
 echo >> Makefile
-echo $\(PROGNAME\): Makefile $SOURCES $HEADERS $DATA >> Makefile
+echo $\(PROGNAME\): Makefile $SOURCES $HEADERS >> Makefile
 echo \ $\(CC\) $\(CFLAGS\) $\(LDFLAGS\) $SOURCES -o $\(PROGNAME\) >> Makefile
 echo \ @ls -l $\(PROGNAME\) >> Makefile
 echo \ @cp $\(PROGNAME\) $\(PROGNAME\).strip >> Makefile
diff --git a/gui.c b/gui.c
index 820dbd4..b83ec31 100644 (file)
--- a/gui.c
+++ b/gui.c
@@ -173,6 +173,7 @@ void gui_draw_task(screen *sc, taskbar *tb, task *tk, int redraw)
     RrAppearance *a;
     RrAppearance *b;
     const icon *i;
+    int icon_size = 0;
 
     if (tk->iconified)
         b = iconified_task;
@@ -201,15 +202,16 @@ void gui_draw_task(screen *sc, taskbar *tb, task *tk, int redraw)
         d->height = i->height;
         d->alpha = tk->iconified ? 0x80 : tk->shaded ? 0xB0 : 0xff;
         d->data = i->data;
+        icon_size = ICON_SIZE + PADDING;
     }
 
     a->surface.parent = b;
-    a->surface.parentx = ICON_SIZE+2*PADDING;
+    a->surface.parentx = icon_size + PADDING;
     a->texture[0].data.text.string = tk->name;
     b->surface.parentx = tk->pos_x;
 
     RrPaintPixmap(b, tk->width, tb->h);
-    RrPaintPixmap(a, tk->width-3*PADDING-ICON_SIZE, tb->h);
+    RrPaintPixmap(a, tk->width-(2*PADDING+icon_size), tb->h);
 
     if (i) {
         RrPaintPixmap(a_icon, ICON_SIZE, ICON_SIZE);
@@ -218,7 +220,7 @@ void gui_draw_task(screen *sc, taskbar *tb, task *tk, int redraw)
     }
 
     XCopyArea(sc->dd, a->pixmap, b->pixmap, sc->fore_gc, 0, 0,
-              tk->width-3*PADDING-ICON_SIZE, tb->h, ICON_SIZE+2*PADDING, 0);
+              tk->width-(2*PADDING+icon_size), tb->h, icon_size + PADDING, 0);
     XCopyArea(sc->dd, b->pixmap, tb->bg, sc->fore_gc, 0, 0,
               tk->width, tb->h, tk->pos_x, 0);
 
diff --git a/icon.xpm b/icon.xpm
deleted file mode 100644 (file)
index 288cfba..0000000
--- a/icon.xpm
+++ /dev/null
@@ -1,35 +0,0 @@
-/* XPM */
-static char * icon_xpm[] = {
-"16 16 16 1",
-"      c None",
-".     c #323232",
-"+     c #535353",
-"@     c #4A8A8E",
-"#     c #DEE2E2",
-"$     c #7E827A",
-"%     c #8A9292",
-"&     c #D6D6D6",
-"*     c #36767E",
-"=     c #9E9E9E",
-"-     c #FAFAFA",
-";     c #B2B2B2",
-">     c #DEEEEA",
-",     c #464646",
-"'     c #5EA2A2",
-")     c #52969A",
-"                ",
-"                ",
-" --#>>>>>>#-#-; ",
-" -&%')))))=&=&+ ",
-" >;$@*****=;%;+ ",
-" &$$$$$$$$$$$$, ",
-" &;;;;;;;;;;;;+ ",
-" &;;;;;;;;;;;;+ ",
-" #;;;;;;;;;;;;+ ",
-" &;;;;;;;;;;;;+ ",
-" #;;;;;;;;;;;;+ ",
-" #;;;;;;;;;;;;+ ",
-" &;;;;;;;;;;;;+ ",
-" $............. ",
-"                ",
-"                "};