mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-14 14:21:56 +00:00
LibWeb+UI: Add internals API to set browser zoom
This commit is contained in:
parent
f39433d6b0
commit
5cc9a5802d
Notes:
github-actions[bot]
2025-01-21 15:12:32 +00:00
Author: https://github.com/InvalidUsernameException
Commit: 5cc9a5802d
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2982
Reviewed-by: https://github.com/AtkinsSJ
17 changed files with 78 additions and 3 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue