30 lines
739 B
C++
30 lines
739 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->setBackground(ThemeToken::SystemToken::Primary);
|
|
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>();
|
|
}
|