Fix wrapping of try-unmount dialogue on macOS (#1989).
authorCarl Hetherington <cth@carlh.net>
Sun, 9 May 2021 08:39:26 +0000 (10:39 +0200)
committerCarl Hetherington <cth@carlh.net>
Sun, 9 May 2021 21:15:05 +0000 (23:15 +0200)
src/wx/try_unmount_dialog.cc

index ffa4af535b7271966db5d38c5616052e48b33196..8a75a13761a6d443ac60ce8e333cf97acd8d6a91 100644 (file)
 #include <wx/wx.h>
 
 
+static int constexpr width = 300;
+
+
 TryUnmountDialog::TryUnmountDialog (wxWindow* parent, wxString description)
        : wxDialog (parent, wxID_ANY, _("DCP-o-matic Disk Writer"))
 {
        auto sizer = new wxBoxSizer (wxVERTICAL);
-       auto text = new StaticText (this, wxEmptyString);
+       auto text = new StaticText (this, wxEmptyString, wxDefaultPosition, wxSize(width, -1));
        sizer->Add (text, 1, wxEXPAND | wxALL, DCPOMATIC_DIALOG_BORDER);
 
        text->SetLabelMarkup (
                wxString::Format(_("The drive <b>%s</b> is mounted.\n\nIt must be unmounted before DCP-o-matic can write to it.\n\nShould DCP-o-matic try to unmount it now?"), description)
                );
+       text->Wrap(width);
 
        auto buttons = CreateSeparatedButtonSizer (wxOK | wxCANCEL);
        if (buttons) {