summaryrefslogtreecommitdiff
path: root/Userland/Applications/PDFViewer/SidebarWidget.cpp
blob: a2740f30365ed6e2a153adbd04ef3659f75436be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/*
 * Copyright (c) 2021, Matthew Olsson <mattco@serenityos.org>
 *
 * SPDX-License-Identifier: BSD-2-Clause
 */

#include "SidebarWidget.h"
#include <LibGUI/BoxLayout.h>
#include <LibGUI/TabWidget.h>

SidebarWidget::SidebarWidget()
{
    set_fill_with_background_color(true);
    set_layout<GUI::VerticalBoxLayout>();
    set_enabled(false);

    auto& tab_bar = add<GUI::TabWidget>();

    auto& outline_container = tab_bar.add_tab<GUI::Widget>("Outline");
    outline_container.set_layout<GUI::VerticalBoxLayout>();
    outline_container.layout()->set_margins(4);

    m_outline_tree_view = outline_container.add<GUI::TreeView>();
    m_outline_tree_view->set_activates_on_selection(true);

    auto& thumbnails_container = tab_bar.add_tab<GUI::Widget>("Thumbnails");
    thumbnails_container.set_layout<GUI::VerticalBoxLayout>();
    thumbnails_container.layout()->set_margins(4);

    // FIXME: Add thumbnail previews
}