main: use RTTI to set dialog fixed size

Signed-off-by: Stanislaw Halik <sthalik@misaki.pl>
accela: layouts done, sorry for commit spam

Signed-off-by: Stanislaw Halik <sthalik@misaki.pl>
use cmath instead of C header

Signed-off-by: Stanislaw Halik <sthalik@misaki.pl>