calculate size of items depending on view bounds

Signed-off-by: Ruben Mendez <ruben.mendez@gmail.com>