X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=src%2Fwx%2Fhtml_dialog.cc;h=19c3aaf2a11591987678cf666f105d66c5e7cbd1;hp=824d4fabcea713f676631eee32f7ed04febbee0f;hb=704bc0f8be05ddca94a3853a6e112f22f8f2df70;hpb=3c29aa6531a4046a8db72dcac81189eb8893233c diff --git a/src/wx/html_dialog.cc b/src/wx/html_dialog.cc index 824d4fabc..19c3aaf2a 100644 --- a/src/wx/html_dialog.cc +++ b/src/wx/html_dialog.cc @@ -35,7 +35,7 @@ using namespace boost::placeholders; #endif -HTMLDialog::HTMLDialog (wxWindow* parent, wxString title, wxString html) +HTMLDialog::HTMLDialog (wxWindow* parent, wxString title, wxString html, bool ok) : wxDialog (parent, wxID_ANY, title) { auto sizer = new wxBoxSizer (wxVERTICAL); @@ -45,7 +45,7 @@ HTMLDialog::HTMLDialog (wxWindow* parent, wxString title, wxString html) /* Add some resources that are used by HTML passed into this dialog */ wxMemoryFSHandler::AddFile( "me.jpg", - wxBitmap(std_to_wx(boost::filesystem::path(resources_path() / "me.jpg").string()), wxBITMAP_TYPE_JPEG), wxBITMAP_TYPE_JPEG + wxBitmap(bitmap_path("me.jpg"), wxBITMAP_TYPE_JPEG), wxBITMAP_TYPE_JPEG ); auto h = new wxHtmlWindow (this); @@ -61,7 +61,14 @@ HTMLDialog::HTMLDialog (wxWindow* parent, wxString title, wxString html) SetSize (800, -1); /* Set height */ - SetSize (h->GetInternalRepresentation()->GetWidth(), h->GetInternalRepresentation()->GetHeight() + 64); + SetSize (h->GetInternalRepresentation()->GetWidth(), h->GetInternalRepresentation()->GetHeight() + 256); + + if (ok) { + auto buttons = CreateSeparatedButtonSizer(wxOK); + if (buttons) { + sizer->Add(buttons, wxSizerFlags().Expand().DoubleBorder()); + } + } }