mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-14 13:45:59 +08:00
WebviewDialog minimal size.
This commit is contained in:
parent
d3d16aa964
commit
fd8a580dee
@ -655,7 +655,8 @@ WebViewDialog::WebViewDialog(wxWindow* parent, const wxString& url, const wxStri
|
|||||||
, m_loading_html(loading_html)
|
, m_loading_html(loading_html)
|
||||||
{
|
{
|
||||||
wxBoxSizer* topsizer = new wxBoxSizer(wxVERTICAL);
|
wxBoxSizer* topsizer = new wxBoxSizer(wxVERTICAL);
|
||||||
SetSizer(topsizer);
|
topsizer->SetMinSize(size);
|
||||||
|
SetSizerAndFit(topsizer);
|
||||||
|
|
||||||
// Create the webview
|
// Create the webview
|
||||||
m_browser = WebView::CreateWebView(this, GUI::format_wxstr("file://%1%/web/%2%.html", boost::filesystem::path(resources_dir()).generic_string(), m_loading_html));
|
m_browser = WebView::CreateWebView(this, GUI::format_wxstr("file://%1%/web/%2%.html", boost::filesystem::path(resources_dir()).generic_string(), m_loading_html));
|
||||||
@ -670,7 +671,7 @@ WebViewDialog::WebViewDialog(wxWindow* parent, const wxString& url, const wxStri
|
|||||||
Bind(wxEVT_SHOW, &WebViewDialog::on_show, this);
|
Bind(wxEVT_SHOW, &WebViewDialog::on_show, this);
|
||||||
Bind(wxEVT_WEBVIEW_SCRIPT_MESSAGE_RECEIVED, &WebViewDialog::on_script_message, this, m_browser->GetId());
|
Bind(wxEVT_WEBVIEW_SCRIPT_MESSAGE_RECEIVED, &WebViewDialog::on_script_message, this, m_browser->GetId());
|
||||||
|
|
||||||
m_browser->LoadURL(url);
|
m_browser->LoadURL(url);
|
||||||
}
|
}
|
||||||
WebViewDialog::~WebViewDialog()
|
WebViewDialog::~WebViewDialog()
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user