Don't set min and max size of window twice
Don't save and restore panel length
length gets overriden from the QML side so there is no point loading and
restoring it.
This also simpifies code somewhat removing places where we clearly did
the same bit of code twice.