mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-28 20:19:36 +02:00
27 lines
747 B
C++
27 lines
747 B
C++
/*
|
|
This file is part of Telegram Desktop,
|
|
the official desktop application for the Telegram messaging service.
|
|
|
|
For license and copyright information please follow this link:
|
|
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|
*/
|
|
#include "editor/photo_editor.h"
|
|
|
|
#include "editor/photo_editor_content.h"
|
|
#include "editor/photo_editor_controls.h"
|
|
|
|
namespace Editor {
|
|
|
|
PhotoEditor::PhotoEditor(
|
|
not_null<Ui::RpWidget*> parent,
|
|
std::shared_ptr<QPixmap> photo)
|
|
: RpWidget(parent)
|
|
, _content(base::make_unique_q<PhotoEditorContent>(this, photo))
|
|
, _controls(base::make_unique_q<PhotoEditorControls>(this)) {
|
|
sizeValue(
|
|
) | rpl::start_with_next([=](const QSize &size) {
|
|
_content->resize(size);
|
|
}, lifetime());
|
|
}
|
|
|
|
} // namespace Editor
|