diff options
author | Rodrigo Tobar <rtobar@icrar.org> | 2022-12-17 13:39:27 +0800 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-12-17 19:40:52 +0100 |
commit | aaa210e6db0a068c8f16643ad56e0b2665449bde (patch) | |
tree | 7fb9a232640816311b7bd14a484060fc7079db26 /Userland/Applications/PDFViewer/SidebarWidget.cpp | |
parent | c76564b5330a93e699cd40a0b85146fa2711a146 (diff) | |
download | serenity-aaa210e6db0a068c8f16643ad56e0b2665449bde.zip |
PDFViewer: Show page numbers in Outline TreeView
This is a nice addition to the outline view, which previously simply
displayed the titles of each section. Pages are shown in the first
column, but the tree is expanded via the second column, where the title
is.
Diffstat (limited to 'Userland/Applications/PDFViewer/SidebarWidget.cpp')
-rw-r--r-- | Userland/Applications/PDFViewer/SidebarWidget.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Userland/Applications/PDFViewer/SidebarWidget.cpp b/Userland/Applications/PDFViewer/SidebarWidget.cpp index a2740f3036..ad97d83cab 100644 --- a/Userland/Applications/PDFViewer/SidebarWidget.cpp +++ b/Userland/Applications/PDFViewer/SidebarWidget.cpp @@ -22,6 +22,8 @@ SidebarWidget::SidebarWidget() m_outline_tree_view = outline_container.add<GUI::TreeView>(); m_outline_tree_view->set_activates_on_selection(true); + m_outline_tree_view->set_should_fill_selected_rows(true); + m_outline_tree_view->set_selection_behavior(GUI::AbstractView::SelectionBehavior::SelectRows); auto& thumbnails_container = tab_bar.add_tab<GUI::Widget>("Thumbnails"); thumbnails_container.set_layout<GUI::VerticalBoxLayout>(); |