mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Improved content margins in photo editor.
This commit is contained in:
parent
038de9ef15
commit
b1477260f0
2 changed files with 9 additions and 3 deletions
|
@ -17,6 +17,12 @@ photoEditorControlsHeight: 146px;
|
||||||
photoEditorControlsBottomSkip: 20px;
|
photoEditorControlsBottomSkip: 20px;
|
||||||
photoEditorControlsCenterSkip: 6px;
|
photoEditorControlsCenterSkip: 6px;
|
||||||
|
|
||||||
|
photoEditorContentMargins: margins(
|
||||||
|
photoEditorControlsBottomSkip,
|
||||||
|
photoEditorControlsBottomSkip,
|
||||||
|
photoEditorControlsBottomSkip,
|
||||||
|
photoEditorControlsHeight);
|
||||||
|
|
||||||
photoEditorBarAnimationDuration: 200;
|
photoEditorBarAnimationDuration: 200;
|
||||||
|
|
||||||
photoEditorButtonIconFg: mediaviewPipControlsFg;
|
photoEditorButtonIconFg: mediaviewPipControlsFg;
|
||||||
|
|
|
@ -80,11 +80,11 @@ PhotoEditor::PhotoEditor(
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const auto geometry = QRect(QPoint(), size);
|
const auto geometry = QRect(QPoint(), size);
|
||||||
const auto contentRect = geometry
|
const auto contentRect = geometry - st::photoEditorContentMargins;
|
||||||
- style::margins(0, 0, 0, st::photoEditorControlsHeight);
|
|
||||||
_content->setGeometry(contentRect);
|
_content->setGeometry(contentRect);
|
||||||
|
const auto contentBottom = contentRect.top() + contentRect.height();
|
||||||
const auto controlsRect = geometry
|
const auto controlsRect = geometry
|
||||||
- style::margins(0, contentRect.height(), 0, 0);
|
- style::margins(0, contentBottom, 0, 0);
|
||||||
_controls->setGeometry(controlsRect);
|
_controls->setGeometry(controlsRect);
|
||||||
}, lifetime());
|
}, lifetime());
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue