unify orca web dialog style

This commit is contained in:
SoftFever
2026-07-05 01:17:17 +08:00
parent 383969d456
commit 5d8aa9610a
22 changed files with 439 additions and 544 deletions

View File

@@ -407,6 +407,12 @@ void WebView::RecreateAll()
for (auto webView : g_webviews) {
webView->SetUserAgent(wxString::Format("Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) BBL-Slicer/v%s (%s) BBL-Language/%s",
Slic3r::GUI::wxGetApp().get_bbl_client_version(), dark ? "dark" : "light", language_code.mb_str()));
webView->Reload();
// A host-themed WebViewHostDialog re-themes in place (no reload). If it handles
// the event, skip the reload; legacy pages fall through and reload as before
// (their own dark.css swap re-themes them on reload).
wxCommandEvent evt(EVT_WEBVIEW_RECREATED);
evt.SetEventObject(webView);
if (!webView->GetEventHandler()->ProcessEvent(evt))
webView->Reload();
}
}