Enable dock applets of size other than 64x64 (patch from Jonas Aaberg <cja@gmx.net>).

SVN revision: 9882
This commit is contained in:
Kim Woelders 2004-04-24 08:08:07 +00:00
parent d605db1f61
commit e4a8c6a63d
2 changed files with 11 additions and 9 deletions

View File

@ -513,13 +513,13 @@ ButtonFindEmptySpotFor(Button * bt, const char *listname, char dirtomove)
if (!done) if (!done)
{ {
if (dirtomove == ICON_RIGHT) if (dirtomove == ICON_RIGHT)
bt->x += bt->w; bt->x = blst[j]->w + blst[j]->x;
else if (dirtomove == ICON_LEFT) else if (dirtomove == ICON_LEFT)
bt->x -= bt->w; bt->x = blst[j]->x - bt->w;
else if (dirtomove == ICON_DOWN) else if (dirtomove == ICON_DOWN)
bt->y += bt->h; bt->y = blst[j]->h + blst[j]->y;
else if (dirtomove == ICON_UP) else if (dirtomove == ICON_UP)
bt->y -= bt->h; bt->y = blst[j]->y - bt->h;
} }
} }
} }

View File

@ -36,14 +36,16 @@ DockIt(EWin * ewin)
ic = FindItem("DEFAULT_DOCK_BUTTON", 0, LIST_FINDBY_NAME, LIST_TYPE_ICLASS); ic = FindItem("DEFAULT_DOCK_BUTTON", 0, LIST_FINDBY_NAME, LIST_TYPE_ICLASS);
if (Conf.dock.startx >= 0) if (Conf.dock.startx >= 0)
{ {
bt = ButtonCreate(id, ic, ac, NULL, NULL, 1, 0, 64, 64, 64, 64, 0, 0, bt = ButtonCreate(id, ic, ac, NULL, NULL, 1, 0,
Conf.dock.startx, 0, Conf.dock.starty, 0, 0, 0, 0, 0, ewin->w, ewin->w, ewin->h, ewin->h,
1, 0, 1); 0, 0, Conf.dock.startx, 0, Conf.dock.starty, 0,
0, 0, 0, 0, 1, 0, 1);
} }
else else
{ {
bt = ButtonCreate(id, ic, ac, NULL, NULL, 1, 0, 64, 64, 64, 64, 0, 2046, bt = ButtonCreate(id, ic, ac, NULL, NULL, 1, 0,
0, 0, 0, 1023, 0, 0, 0, 0, 1, 0, 1); ewin->w, ewin->w, ewin->h, ewin->h,
0, 2046, 0, 0, 0, 1023, 0, 0, 0, 0, 1, 0, 1);
} }
UngrabX(); UngrabX();