stuff-from-scratch/apps/notes_tk/image_editor/ImageEditorView.cpp
2023-01-20 08:07:09 +00:00

29 lines
679 B
C++

#include "ImageEditorView.h"
#include "Label.h"
#include "Color.h"
#include "TextNode.h"
#include "Theme.h"
#include "ImageViewWidget.h"
#include "HorizontalSpacer.h"
ImageEditorView::ImageEditorView()
{
auto label = Label::Create();
label->setLabel("Image Editor");
label->setMargin(1);
auto image_widget = std::make_unique<ImageViewWidget>();
auto hSpacer = HorizontalSpacer::Create();
hSpacer->addWidgetWithScale(std::move(label), 1);
hSpacer->addWidgetWithScale(std::move(image_widget), 14);
addWidget(std::move(hSpacer));
}
std::unique_ptr<ImageEditorView> ImageEditorView::Create()
{
return std::make_unique<ImageEditorView>();
}