diff --git a/Telegram/SourceFiles/editor/editor.style b/Telegram/SourceFiles/editor/editor.style index dd2abf492..ed7df6457 100644 --- a/Telegram/SourceFiles/editor/editor.style +++ b/Telegram/SourceFiles/editor/editor.style @@ -17,6 +17,12 @@ photoEditorControlsHeight: 146px; photoEditorControlsBottomSkip: 20px; photoEditorControlsCenterSkip: 6px; +photoEditorContentMargins: margins( + photoEditorControlsBottomSkip, + photoEditorControlsBottomSkip, + photoEditorControlsBottomSkip, + photoEditorControlsHeight); + photoEditorBarAnimationDuration: 200; photoEditorButtonIconFg: mediaviewPipControlsFg; diff --git a/Telegram/SourceFiles/editor/photo_editor.cpp b/Telegram/SourceFiles/editor/photo_editor.cpp index 8113370be..f1db920ef 100644 --- a/Telegram/SourceFiles/editor/photo_editor.cpp +++ b/Telegram/SourceFiles/editor/photo_editor.cpp @@ -80,11 +80,11 @@ PhotoEditor::PhotoEditor( return; } const auto geometry = QRect(QPoint(), size); - const auto contentRect = geometry - - style::margins(0, 0, 0, st::photoEditorControlsHeight); + const auto contentRect = geometry - st::photoEditorContentMargins; _content->setGeometry(contentRect); + const auto contentBottom = contentRect.top() + contentRect.height(); const auto controlsRect = geometry - - style::margins(0, contentRect.height(), 0, 0); + - style::margins(0, contentBottom, 0, 0); _controls->setGeometry(controlsRect); }, lifetime());