mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
Added button highlighting for flipped image to photo editor.
This commit is contained in:
@@ -135,6 +135,7 @@ void HorizontalContainer::updateChildrenPosition() {
|
||||
PhotoEditorControls::PhotoEditorControls(
|
||||
not_null<Ui::RpWidget*> parent,
|
||||
std::shared_ptr<UndoController> undoController,
|
||||
const PhotoModifications modifications,
|
||||
bool doneControls)
|
||||
: RpWidget(parent)
|
||||
, _bg(st::mediaviewSaveMsgBg)
|
||||
@@ -173,7 +174,8 @@ PhotoEditorControls::PhotoEditorControls(
|
||||
false,
|
||||
_bg,
|
||||
st::lightButtonFg,
|
||||
st::photoEditorRotateButton.ripple)) {
|
||||
st::photoEditorRotateButton.ripple))
|
||||
, _flipped(modifications.flipped) {
|
||||
|
||||
_transformButtons->updateChildrenPosition();
|
||||
_paintButtons->updateChildrenPosition();
|
||||
@@ -241,6 +243,14 @@ PhotoEditorControls::PhotoEditorControls(
|
||||
: &st::photoEditorRedoButtonInactive);
|
||||
}, lifetime());
|
||||
|
||||
_flipButton->clicks(
|
||||
) | rpl::start_with_next([=] {
|
||||
_flipped = !_flipped;
|
||||
_flipButton->setIconOverride(_flipped
|
||||
? &st::photoEditorFlipButton.iconOver
|
||||
: nullptr);
|
||||
}, _flipButton->lifetime());
|
||||
|
||||
}
|
||||
|
||||
rpl::producer<int> PhotoEditorControls::rotateRequests() const {
|
||||
|
||||
Reference in New Issue
Block a user