2020-06-27 09:47:30 +00:00
|
|
|
#include "ImageEditorView.h"
|
2021-03-06 21:02:13 +00:00
|
|
|
|
2020-06-27 09:47:30 +00:00
|
|
|
#include "Label.h"
|
2021-03-06 21:02:13 +00:00
|
|
|
#include "Color.h"
|
2022-11-16 15:06:08 +00:00
|
|
|
#include "TextNode.h"
|
2022-11-17 17:33:48 +00:00
|
|
|
#include "Theme.h"
|
|
|
|
#include "ImageViewWidget.h"
|
|
|
|
|
|
|
|
#include "HorizontalSpacer.h"
|
2020-06-27 09:47:30 +00:00
|
|
|
|
|
|
|
ImageEditorView::ImageEditorView()
|
|
|
|
{
|
|
|
|
auto label = Label::Create();
|
2022-11-11 14:22:31 +00:00
|
|
|
label->setLabel("Image Editor");
|
2022-11-17 17:33:48 +00:00
|
|
|
label->setBackgroundColor(Theme::getBackgroundPrimary());
|
2022-11-11 14:22:31 +00:00
|
|
|
label->setMargin(1);
|
2022-11-17 17:33:48 +00:00
|
|
|
|
|
|
|
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));
|
2020-06-27 09:47:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
std::unique_ptr<ImageEditorView> ImageEditorView::Create()
|
|
|
|
{
|
|
|
|
return std::make_unique<ImageEditorView>();
|
|
|
|
}
|