Refactor message box to not use uic to generate the UI

Also fixes incorrect resize of message box when toggling detailed
message.