Main window: Fix layout when exporting a doc

Signed-off-by: Jerome Flesch <jflesch@gmail.com>