Panel management in the Levels dialog (and perhaps other dialogs with previews, I haven't tested them yet) is messed up big time!
With previews off:
And with previews on:
This desperately needs a better implementation:
If previews are off, the dialog should shrink vertically to the height of the controls + histogram.
Of previews are on, the dialog should expand vertically to also display the previews.
In no case should the histogram/controls panel change height! The histogram/controls should always maintain a fixed vertical size, with the histogram showing a useful (not too tall, not too short) proportion.