LibWebView: Add defaultZoomLevelFactor setting and necessary plumbing

This commit is contained in:
rmg-x 2025-08-23 11:15:31 -05:00 committed by Tim Flynn
commit 333164ecf9
Notes: github-actions[bot] 2025-08-26 10:32:48 +00:00
6 changed files with 45 additions and 0 deletions

View file

@ -601,6 +601,7 @@ void ViewImplementation::initialize_client(CreateNewClient create_new_client)
if (auto const& user_agent_preset = Application::web_content_options().user_agent_preset; user_agent_preset.has_value())
client().async_debug_request(m_client_state.page_index, "spoof-user-agent"sv, *user_agents.get(*user_agent_preset));
default_zoom_level_factor_changed();
languages_changed();
autoplay_settings_changed();
do_not_track_changed();
@ -651,6 +652,12 @@ void ViewImplementation::handle_web_content_process_crash(LoadErrorPage load_err
}
}
void ViewImplementation::default_zoom_level_factor_changed()
{
auto const default_zoom_level_factor = Application::settings().default_zoom_level_factor();
set_zoom(default_zoom_level_factor);
}
void ViewImplementation::languages_changed()
{
auto const& languages = Application::settings().languages();