mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-25 10:48:41 +00:00
LibWeb+UI: Add internals API to set browser zoom
This commit is contained in:
committed by
Alexander Kalenik
parent
f39433d6b0
commit
5cc9a5802d
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user