diff options
author | Nikias Bassen | 2009-12-26 23:34:40 +0100 |
---|---|---|
committer | Nikias Bassen | 2009-12-26 23:34:40 +0100 |
commit | 050c597ecdbd0869489582e07b437eaa0bb10cd3 (patch) | |
tree | 8b3f02d603c75f5cfa3752dcc4e4d3245e754d61 /src | |
parent | 3871f88ea4b2238bdcc48113ad8737803ec77894 (diff) | |
download | sbmanager-050c597ecdbd0869489582e07b437eaa0bb10cd3.tar.gz sbmanager-050c597ecdbd0869489582e07b437eaa0bb10cd3.tar.bz2 |
Some way better multirow icon aligment
Diffstat (limited to 'src')
-rw-r--r-- | src/sbmanager.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/sbmanager.c b/src/sbmanager.c index 4b8a5c7..3976f88 100644 --- a/src/sbmanager.c +++ b/src/sbmanager.c @@ -654,17 +654,19 @@ static GList *insert_into_icon_list(GList *iconlist, SBItem *newitem, gfloat ite gfloat xpos = clutter_actor_get_x(icon); gfloat ypos = clutter_actor_get_y(icon); - if ((item_y > ypos + 70) || (item_y < ypos - 10)) { - /* this is not the row we are in */ - continue; - } + gint nrow = (ypos - 16) / 88; + gint irow = (item_y - 16) / 88; + + xpos += nrow*STAGE_WIDTH; + gfloat ixpos = item_x + irow*STAGE_WIDTH; + if (move_left) { - if (item_x < xpos + 40) { + if (ixpos < xpos + 40) { newpos = i; break; } } else { - if (item_x < xpos - 10) { + if (ixpos < xpos - 10) { newpos = i; break; } |