Add PNG icon support, better calculate window width/height.

Change-Id: Iead5a2516d1750bc3683a007a7b7f4c63b476c2c
Signed-off-by: Manuel Bachmann <manuel.bachmann@open.eurogiciel.org>