mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 04:47:34 +00:00
Ladybird+Browser: Update zoom text on menu after clicking zoom button
This commit is contained in:
parent
cc9885c0c6
commit
49df2e1e3a
6 changed files with 19 additions and 4 deletions
|
@ -614,6 +614,13 @@ void BrowserWindow::reset_zoom()
|
|||
update_displayed_zoom_level();
|
||||
}
|
||||
|
||||
void BrowserWindow::update_zoom_menu()
|
||||
{
|
||||
VERIFY(m_zoom_menu);
|
||||
auto zoom_level_text = MUST(String::formatted("&Zoom ({}%)", round_to<int>(m_current_tab->view().zoom_level() * 100)));
|
||||
m_zoom_menu->setTitle(qstring_from_ak_string(zoom_level_text));
|
||||
}
|
||||
|
||||
void BrowserWindow::select_all()
|
||||
{
|
||||
if (!m_current_tab)
|
||||
|
@ -627,9 +634,8 @@ void BrowserWindow::select_all()
|
|||
|
||||
void BrowserWindow::update_displayed_zoom_level()
|
||||
{
|
||||
VERIFY(m_zoom_menu && m_current_tab);
|
||||
auto zoom_level_text = MUST(String::formatted("&Zoom ({}%)", round_to<int>(m_current_tab->view().zoom_level() * 100)));
|
||||
m_zoom_menu->setTitle(qstring_from_ak_string(zoom_level_text));
|
||||
VERIFY(m_current_tab);
|
||||
update_zoom_menu();
|
||||
m_current_tab->update_reset_zoom_button();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue