LibWeb+UI: Add internals API to set browser zoom

This commit is contained in:
InvalidUsernameException 2024-12-23 22:15:06 +01:00 committed by Alexander Kalenik
parent f39433d6b0
commit 5cc9a5802d
Notes: github-actions[bot] 2025-01-21 15:12:32 +00:00
17 changed files with 78 additions and 3 deletions

View file

@ -143,6 +143,12 @@ void ViewImplementation::zoom_out()
update_zoom();
}
void ViewImplementation::set_zoom(double zoom_level)
{
m_zoom_level = max(ZOOM_MIN_LEVEL, min(zoom_level, ZOOM_MAX_LEVEL));
update_zoom();
}
void ViewImplementation::reset_zoom()
{
m_zoom_level = 1.0f;