X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Fhtml_dialog.cc;h=c8138c8cd51cf65b7ca7ac06b9827f32ed4d816a;hb=6a35581ef83d48a799208081bcf006de895ddfb4;hp=59bc8a3e8fe2b3ee896b7e1393764e90c83644f5;hpb=eab577b950069b6a22034c22e67b7cc16753cbd8;p=dcpomatic.git diff --git a/src/wx/html_dialog.cc b/src/wx/html_dialog.cc index 59bc8a3e8..c8138c8cd 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); @@ -52,6 +52,10 @@ HTMLDialog::HTMLDialog (wxWindow* parent, wxString title, wxString html) h->SetPage (html); sizer->Add (h, 1, wxEXPAND | wxALL, 6); + if (gui_is_dark()) { + h->SetHTMLBackgroundColour(*wxBLACK); + } + h->Bind (wxEVT_HTML_LINK_CLICKED, boost::bind(&HTMLDialog::link_clicked, this, _1)); SetSizer (sizer); @@ -61,7 +65,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()); + } + } }