2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Added photo painting to PhotoEditorContent.

This commit is contained in:
23rd
2021-02-05 10:08:20 +03:00
parent 45f8e68203
commit f7fa36ca1d
4 changed files with 41 additions and 1 deletions

View File

@@ -15,7 +15,13 @@ namespace Editor {
PhotoEditor::PhotoEditor(
not_null<Ui::RpWidget*> parent,
std::shared_ptr<QPixmap> photo)
: RpWidget(parent) {
: 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