Enable dock applets of size other than 64x64 (patch from Jonas Aaberg <cja@gmx.net>).
SVN revision: 9882
This commit is contained in:
parent
d605db1f61
commit
e4a8c6a63d
|
@ -513,13 +513,13 @@ ButtonFindEmptySpotFor(Button * bt, const char *listname, char dirtomove)
|
|||
if (!done)
|
||||
{
|
||||
if (dirtomove == ICON_RIGHT)
|
||||
bt->x += bt->w;
|
||||
bt->x = blst[j]->w + blst[j]->x;
|
||||
else if (dirtomove == ICON_LEFT)
|
||||
bt->x -= bt->w;
|
||||
bt->x = blst[j]->x - bt->w;
|
||||
else if (dirtomove == ICON_DOWN)
|
||||
bt->y += bt->h;
|
||||
bt->y = blst[j]->h + blst[j]->y;
|
||||
else if (dirtomove == ICON_UP)
|
||||
bt->y -= bt->h;
|
||||
bt->y = blst[j]->y - bt->h;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
12
src/dock.c
12
src/dock.c
|
@ -36,14 +36,16 @@ DockIt(EWin * ewin)
|
|||
ic = FindItem("DEFAULT_DOCK_BUTTON", 0, LIST_FINDBY_NAME, LIST_TYPE_ICLASS);
|
||||
if (Conf.dock.startx >= 0)
|
||||
{
|
||||
bt = ButtonCreate(id, ic, ac, NULL, NULL, 1, 0, 64, 64, 64, 64, 0, 0,
|
||||
Conf.dock.startx, 0, Conf.dock.starty, 0, 0, 0, 0, 0,
|
||||
1, 0, 1);
|
||||
bt = ButtonCreate(id, ic, ac, NULL, NULL, 1, 0,
|
||||
ewin->w, ewin->w, ewin->h, ewin->h,
|
||||
0, 0, Conf.dock.startx, 0, Conf.dock.starty, 0,
|
||||
0, 0, 0, 0, 1, 0, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
bt = ButtonCreate(id, ic, ac, NULL, NULL, 1, 0, 64, 64, 64, 64, 0, 2046,
|
||||
0, 0, 0, 1023, 0, 0, 0, 0, 1, 0, 1);
|
||||
bt = ButtonCreate(id, ic, ac, NULL, NULL, 1, 0,
|
||||
ewin->w, ewin->w, ewin->h, ewin->h,
|
||||
0, 2046, 0, 0, 0, 1023, 0, 0, 0, 0, 1, 0, 1);
|
||||
}
|
||||
UngrabX();
|
||||
|
||||
|
|
Loading…
Reference in New Issue