mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:27:45 +00:00
PDFViewer: Show single/multi page actions on toolbar
These actions were being constructed, and they work, but were not shown in the toolbar. Adding them will allow users to actually use them, as well as pick up any bugs they might have.
This commit is contained in:
parent
cbb373e135
commit
44c518e767
1 changed files with 5 additions and 0 deletions
|
@ -149,10 +149,12 @@ void PDFViewerWidget::initialize_toolbar(GUI::Toolbar& toolbar)
|
|||
m_page_view_mode_single = GUI::Action::create_checkable("Single", [&](auto&) {
|
||||
m_viewer->set_page_view_mode(PDFViewer::PageViewMode::Single);
|
||||
});
|
||||
m_page_view_mode_single->set_status_tip("Show single page at a time");
|
||||
|
||||
m_page_view_mode_multiple = GUI::Action::create_checkable("Multiple", [&](auto&) {
|
||||
m_viewer->set_page_view_mode(PDFViewer::PageViewMode::Multiple);
|
||||
});
|
||||
m_page_view_mode_multiple->set_status_tip("Show multiple pages at a time");
|
||||
|
||||
if (m_viewer->page_view_mode() == PDFViewer::PageViewMode::Single) {
|
||||
m_page_view_mode_single->set_checked(true);
|
||||
|
@ -163,6 +165,9 @@ void PDFViewerWidget::initialize_toolbar(GUI::Toolbar& toolbar)
|
|||
m_page_view_action_group.add_action(*m_page_view_mode_single);
|
||||
m_page_view_action_group.add_action(*m_page_view_mode_multiple);
|
||||
m_page_view_action_group.set_exclusive(true);
|
||||
toolbar.add_action(*m_page_view_mode_single);
|
||||
toolbar.add_action(*m_page_view_mode_multiple);
|
||||
toolbar.add_separator();
|
||||
|
||||
toolbar.add_action(*m_zoom_in_action);
|
||||
toolbar.add_action(*m_zoom_out_action);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue