mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 15:16:14 +00:00
LibWebView+Ladybird: Move zoom logic to ViewImplementation
This commit is contained in:
committed by
Andreas Kling
parent
5411adca22
commit
5d9f4b2ffc
@@ -20,4 +20,26 @@ WebContentClient const& ViewImplementation::client() const
|
||||
return *m_client_state.client;
|
||||
}
|
||||
|
||||
void ViewImplementation::zoom_in()
|
||||
{
|
||||
if (m_zoom_level >= ZOOM_MAX_LEVEL)
|
||||
return;
|
||||
m_zoom_level += ZOOM_STEP;
|
||||
update_zoom();
|
||||
}
|
||||
|
||||
void ViewImplementation::zoom_out()
|
||||
{
|
||||
if (m_zoom_level <= ZOOM_MIN_LEVEL)
|
||||
return;
|
||||
m_zoom_level -= ZOOM_STEP;
|
||||
update_zoom();
|
||||
}
|
||||
|
||||
void ViewImplementation::reset_zoom()
|
||||
{
|
||||
m_zoom_level = 1.0f;
|
||||
update_zoom();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user