feature remove the not work code.

This commit is contained in:
alves
2026-03-05 16:42:32 +08:00
parent bef0f6edae
commit b27cd73e31
6 changed files with 6 additions and 17 deletions

View File

@@ -504,12 +504,6 @@ std::deque<wxDialog*> dialogStack;
void fit_in_display(wxTopLevelWindow& window, wxSize desired_size) void fit_in_display(wxTopLevelWindow& window, wxSize desired_size)
{ {
// GTK requires width >= -1 and height > 0 for gtk_window_resize/set_size_request
if (desired_size.GetWidth() < WINDOW_MIN_WIDTH)
desired_size.SetWidth(WINDOW_MIN_WIDTH);
if (desired_size.GetHeight() < WINDOW_MIN_HEIGHT)
desired_size.SetHeight(WINDOW_MIN_HEIGHT);
const auto display_size = wxDisplay(window.GetParent()).GetClientArea(); const auto display_size = wxDisplay(window.GetParent()).GetClientArea();
if (desired_size.GetWidth() > display_size.GetWidth()) { if (desired_size.GetWidth() > display_size.GetWidth()) {
desired_size.SetWidth(display_size.GetWidth() * 4 / 5); desired_size.SetWidth(display_size.GetWidth() * 4 / 5);

View File

@@ -37,8 +37,7 @@ PrinterCloudAuthDialog::PrinterCloudAuthDialog(wxWindow* parent, PrintHost* host
return; return;
} }
m_browser->Hide(); m_browser->Hide();
// GTK asserts on width < -1 and height <= 0; use minimal size for hidden widget m_browser->SetSize(0, 0);
m_browser->SetSize(1, 1);
// Connect the webview events // Connect the webview events
Bind(wxEVT_WEBVIEW_NAVIGATING, &PrinterCloudAuthDialog::OnNavigationRequest, this, m_browser->GetId()); Bind(wxEVT_WEBVIEW_NAVIGATING, &PrinterCloudAuthDialog::OnNavigationRequest, this, m_browser->GetId());

View File

@@ -134,8 +134,7 @@ GuideFrame::GuideFrame(GUI_App *pGUI, long style)
return; return;
} }
m_browser->Hide(); m_browser->Hide();
// GTK asserts on width < -1 and height <= 0; use minimal size for hidden widget m_browser->SetSize(0, 0);
m_browser->SetSize(1, 1);
SetSizer(topsizer); SetSizer(topsizer);
@@ -497,7 +496,7 @@ void GuideFrame::OnScriptMessage(wxWebViewEvent &evt)
} }
} }
wxGetApp().fltviews().reload_all(); wxGetApp().fltviews().relead_all();
} }
this->EndModal(wxID_OK); this->EndModal(wxID_OK);

View File

@@ -138,8 +138,7 @@ WebPresetDialog::WebPresetDialog(GUI_App* pGUI, long style)
return; return;
} }
m_browser->Hide(); m_browser->Hide();
// GTK asserts on width < -1 and height <= 0; use minimal size for hidden widget m_browser->SetSize(0, 0);
m_browser->SetSize(1, 1);
SetSizer(topsizer); SetSizer(topsizer);

View File

@@ -75,8 +75,7 @@ SMUserLogin::SMUserLogin(bool isLogout) : wxDialog((wxWindow *) (wxGetApp().main
return; return;
} }
m_browser->Hide(); m_browser->Hide();
// GTK asserts on width < -1 and height <= 0; use minimal size for hidden widget m_browser->SetSize(0, 0);
m_browser->SetSize(1, 1);
// Log backend information // Log backend information
// wxLogMessage(wxWebView::GetBackendVersionInfo().ToString()); // wxLogMessage(wxWebView::GetBackendVersionInfo().ToString());

View File

@@ -98,8 +98,7 @@ ZUserLogin::ZUserLogin() : wxDialog((wxWindow *) (wxGetApp().mainframe), wxID_AN
return; return;
} }
m_browser->Hide(); m_browser->Hide();
// GTK asserts on width < -1 and height <= 0; use minimal size for hidden widget m_browser->SetSize(0, 0);
m_browser->SetSize(1, 1);
// Log backend information // Log backend information
// wxLogMessage(wxWebView::GetBackendVersionInfo().ToString()); // wxLogMessage(wxWebView::GetBackendVersionInfo().ToString());