summaryrefslogtreecommitdiff
path: root/src/wx/html_dialog.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/wx/html_dialog.cc')
-rw-r--r--src/wx/html_dialog.cc15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/wx/html_dialog.cc b/src/wx/html_dialog.cc
index c8138c8cd..44b51bbe0 100644
--- a/src/wx/html_dialog.cc
+++ b/src/wx/html_dialog.cc
@@ -49,13 +49,16 @@ HTMLDialog::HTMLDialog (wxWindow* parent, wxString title, wxString html, bool ok
);
auto h = new wxHtmlWindow (this);
- h->SetPage (html);
- sizer->Add (h, 1, wxEXPAND | wxALL, 6);
if (gui_is_dark()) {
- h->SetHTMLBackgroundColour(*wxBLACK);
+ h->SetPage(wxString::Format("<body text=\"white\">%s</body>", html));
+ h->SetHTMLBackgroundColour(wxColour(50, 50, 50));
+ } else {
+ h->SetPage(html);
}
+ sizer->Add (h, 1, wxEXPAND | wxALL, 6);
+
h->Bind (wxEVT_HTML_LINK_CLICKED, boost::bind(&HTMLDialog::link_clicked, this, _1));
SetSizer (sizer);
@@ -76,6 +79,12 @@ HTMLDialog::HTMLDialog (wxWindow* parent, wxString title, wxString html, bool ok
}
+HTMLDialog::~HTMLDialog()
+{
+ wxMemoryFSHandler::RemoveFile("me.jpg");
+}
+
+
void
HTMLDialog::link_clicked (wxHtmlLinkEvent& ev)
{