From bbcaa7b9e0cbce0e5099a27d512c456366c02eff Mon Sep 17 00:00:00 2001 From: Alexander Koshelev Date: Fri, 11 Feb 2022 16:17:44 +0300 Subject: [PATCH] Use wxBitmapBundle in html about sample --- samples/html/about/about.cpp | 1 + samples/html/about/data/about.htm | 4 ++-- samples/html/about/data/bg.svg | 29 +++++++++++++++++++++++++++++ 3 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 samples/html/about/data/bg.svg diff --git a/samples/html/about/about.cpp b/samples/html/about/about.cpp index 74d9768d7c..7952c5b575 100644 --- a/samples/html/about/about.cpp +++ b/samples/html/about/about.cpp @@ -152,6 +152,7 @@ void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event)) html = new wxHtmlWindow(&dlg, wxID_ANY, wxDefaultPosition, wxSize(380, 160), wxHW_SCROLLBAR_NEVER); html -> SetBorders(0); html -> LoadPage("data/about.htm"); + html -> SetHTMLBackgroundImage(wxBitmapBundle::FromSVGFile("data/bg.svg", wxSize(65, 45))); html -> SetInitialSize(wxSize(html -> GetInternalRepresentation() -> GetWidth(), html -> GetInternalRepresentation() -> GetHeight())); diff --git a/samples/html/about/data/about.htm b/samples/html/about/data/about.htm index 9792d1ed01..473e4bdc56 100644 --- a/samples/html/about/data/about.htm +++ b/samples/html/about/data/about.htm @@ -1,8 +1,8 @@ - + -
+

wxHTML Library Sample 0.2.0
diff --git a/samples/html/about/data/bg.svg b/samples/html/about/data/bg.svg new file mode 100644 index 0000000000..4323dd01fd --- /dev/null +++ b/samples/html/about/data/bg.svg @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +