rendering: ceil() instead of truncating for tabbed deco_rect width (Thanks szalik)

In tabbed mode, the available width (say 1280) is divided by the amount
of child containers (say 3). Before this commit, we just truncated the
result and would end up with 426 + 426 + 426 = 1278 pixels that we
render to. Now we render a bit too much, but that’ll at least not give
us graphics corruption on any side :).

fixes #791
This commit is contained in:
Michael Stapelberg 2012-09-05 23:54:56 +02:00
parent 34391ae885
commit 1e3e6997f4
1 changed files with 1 additions and 1 deletions

View File

@ -345,7 +345,7 @@ void render_con(Con *con, bool render_fullscreen) {
child->rect.width = rect.width; child->rect.width = rect.width;
child->rect.height = rect.height; child->rect.height = rect.height;
child->deco_rect.width = child->rect.width / children; child->deco_rect.width = ceil((float)child->rect.width / children);
child->deco_rect.x = x - con->rect.x + i * child->deco_rect.width; child->deco_rect.x = x - con->rect.x + i * child->deco_rect.width;
child->deco_rect.y = y - con->rect.y; child->deco_rect.y = y - con->rect.y;