Lightweight calculations of widget layout

Signed-off-by: Thomas Pasch <thomas.pasch@gmx.de>