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
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;