summaryrefslogtreecommitdiff
path: root/DevTools/HackStudio/FormEditorWidget.cpp
blob: 14c82943380a2d75e40f5d96e1f1d6e08cfe1aa2 (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
#include "FormEditorWidget.h"
#include "FormWidget.h"
#include <LibGUI/GPainter.h>

FormEditorWidget::FormEditorWidget(GWidget* parent)
    : GScrollableWidget(parent)
{
    set_fill_with_background_color(true);
    set_background_color(Color::White);

    set_frame_shape(FrameShape::Container);
    set_frame_shadow(FrameShadow::Sunken);
    set_frame_thickness(2);

    m_form_widget = FormWidget::construct(*this);
}

FormEditorWidget::~FormEditorWidget()
{
}

void FormEditorWidget::paint_event(GPaintEvent& event)
{
    GFrame::paint_event(event);

    GPainter painter(*this);
    painter.add_clip_rect(event.rect());
}