X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=src%2Fwx%2Fhtml_dialog.cc;h=19c3aaf2a11591987678cf666f105d66c5e7cbd1;hp=dcae84cd9d3b4b834e58a54bbf0c7138d34a84c9;hb=704bc0f8be05ddca94a3853a6e112f22f8f2df70;hpb=39fb8198febde1937019db1c300ec363aab5aa56 diff --git a/src/wx/html_dialog.cc b/src/wx/html_dialog.cc index dcae84cd9..19c3aaf2a 100644 --- a/src/wx/html_dialog.cc +++ b/src/wx/html_dialog.cc @@ -22,13 +22,12 @@ #include "html_dialog.h" #include "wx_util.h" #include "lib/cross.h" -#include "lib/warnings.h" -#include -DCPOMATIC_DISABLE_WARNINGS -#include +#include +LIBDCP_DISABLE_WARNINGS #include -DCPOMATIC_ENABLE_WARNINGS -#include +#include +LIBDCP_ENABLE_WARNINGS +#include #if BOOST_VERSION >= 106100 @@ -36,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); @@ -46,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); @@ -62,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()); + } + } }