mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00:00
LibWebView+UI: Generate the zoom menu
This commit is contained in:
parent
7d6ea99d0d
commit
9684e6dbc5
Notes:
github-actions[bot]
2025-09-11 18:24:52 +00:00
Author: https://github.com/trflynn89
Commit: 9684e6dbc5
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6062
20 changed files with 104 additions and 210 deletions
|
|
@ -166,12 +166,6 @@ WebContentView::WebContentView(QWidget* window, RefPtr<WebView::WebContentClient
|
|||
|
||||
m_select_dropdown->exec(map_point_to_global_position(content_position));
|
||||
};
|
||||
|
||||
on_set_browser_zoom = [this](double factor) {
|
||||
set_zoom(factor);
|
||||
auto* window = static_cast<BrowserWindow*>(this->window());
|
||||
window->update_displayed_zoom_level();
|
||||
};
|
||||
}
|
||||
|
||||
WebContentView::~WebContentView() = default;
|
||||
|
|
@ -564,7 +558,7 @@ void WebContentView::update_viewport_size()
|
|||
|
||||
void WebContentView::update_zoom()
|
||||
{
|
||||
client().async_set_device_pixels_per_css_pixel(m_client_state.page_index, m_device_pixel_ratio * m_zoom_level);
|
||||
ViewImplementation::update_zoom();
|
||||
update_viewport_size();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue