ladybird/DevTools/HackStudio/FormEditorWidget.cpp
Andreas Kling 803ebdfe9c HackStudio: Make the FormEditorWidget have a MidGray background
This gives the form editor a VB6-like feeling :^)
2019-11-09 00:41:00 +01:00

28 lines
629 B
C++

#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::MidGray);
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());
}