Saved window state using Settings class.