diff --git a/Telegram/CMakeLists.txt b/Telegram/CMakeLists.txt index 65ca3f23b..e31886e43 100644 --- a/Telegram/CMakeLists.txt +++ b/Telegram/CMakeLists.txt @@ -525,6 +525,7 @@ PRIVATE editor/photo_editor_content.h editor/photo_editor_controls.cpp editor/photo_editor_controls.h + editor/photo_editor_inner_common.h editor/photo_editor_layer_widget.cpp editor/photo_editor_layer_widget.h editor/scene/scene.cpp diff --git a/Telegram/SourceFiles/editor/color_picker.h b/Telegram/SourceFiles/editor/color_picker.h index 7069908f9..2be30e4c6 100644 --- a/Telegram/SourceFiles/editor/color_picker.h +++ b/Telegram/SourceFiles/editor/color_picker.h @@ -8,7 +8,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #pragma once #include "base/unique_qptr.h" -#include "editor/photo_editor_common.h" +#include "editor/photo_editor_inner_common.h" #include "ui/effects/animations.h" namespace Ui { diff --git a/Telegram/SourceFiles/editor/editor_paint.h b/Telegram/SourceFiles/editor/editor_paint.h index d6d566412..00bb6c0d4 100644 --- a/Telegram/SourceFiles/editor/editor_paint.h +++ b/Telegram/SourceFiles/editor/editor_paint.h @@ -10,6 +10,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "ui/rp_widget.h" #include "editor/photo_editor_common.h" +#include "editor/photo_editor_inner_common.h" #include "editor/scene/scene_item_base.h" class QGraphicsItem; diff --git a/Telegram/SourceFiles/editor/photo_editor.h b/Telegram/SourceFiles/editor/photo_editor.h index f16abac32..3cb81a651 100644 --- a/Telegram/SourceFiles/editor/photo_editor.h +++ b/Telegram/SourceFiles/editor/photo_editor.h @@ -11,6 +11,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "base/unique_qptr.h" #include "editor/photo_editor_common.h" +#include "editor/photo_editor_inner_common.h" #include "ui/image/image.h" namespace Window { diff --git a/Telegram/SourceFiles/editor/photo_editor_common.h b/Telegram/SourceFiles/editor/photo_editor_common.h index 89cb41d22..835819e47 100644 --- a/Telegram/SourceFiles/editor/photo_editor_common.h +++ b/Telegram/SourceFiles/editor/photo_editor_common.h @@ -11,19 +11,6 @@ namespace Editor { class Scene; -struct PhotoEditorMode { - enum class Mode { - Transform, - Paint, - } mode = Mode::Transform; - - enum class Action { - None, - Save, - Discard, - } action = Action::None; -}; - struct PhotoModifications { int angle = 0; bool flipped = false; @@ -46,11 +33,6 @@ struct EditorData { bool keepAspectRatio = false; }; -struct Brush { - float sizeRatio = 0.; - QColor color; -}; - [[nodiscard]] QImage ImageModified( QImage image, const PhotoModifications &mods); diff --git a/Telegram/SourceFiles/editor/photo_editor_content.h b/Telegram/SourceFiles/editor/photo_editor_content.h index b76016ac5..4a9ed7b8e 100644 --- a/Telegram/SourceFiles/editor/photo_editor_content.h +++ b/Telegram/SourceFiles/editor/photo_editor_content.h @@ -10,6 +10,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "ui/rp_widget.h" #include "editor/photo_editor_common.h" +#include "editor/photo_editor_inner_common.h" #include "ui/image/image.h" namespace Editor { diff --git a/Telegram/SourceFiles/editor/photo_editor_controls.h b/Telegram/SourceFiles/editor/photo_editor_controls.h index 9b018f0c5..6538abce0 100644 --- a/Telegram/SourceFiles/editor/photo_editor_controls.h +++ b/Telegram/SourceFiles/editor/photo_editor_controls.h @@ -11,6 +11,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "ui/effects/animations.h" #include "editor/photo_editor_common.h" +#include "editor/photo_editor_inner_common.h" namespace Ui { class IconButton; diff --git a/Telegram/SourceFiles/editor/photo_editor_inner_common.h b/Telegram/SourceFiles/editor/photo_editor_inner_common.h new file mode 100644 index 000000000..f3b33b5d5 --- /dev/null +++ b/Telegram/SourceFiles/editor/photo_editor_inner_common.h @@ -0,0 +1,32 @@ +/* +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 +*/ +#pragma once + +namespace Editor { + +class Scene; + +struct PhotoEditorMode { + enum class Mode { + Transform, + Paint, + } mode = Mode::Transform; + + enum class Action { + None, + Save, + Discard, + } action = Action::None; +}; + +struct Brush { + float sizeRatio = 0.; + QColor color; +}; + +} // namespace Editor