diff --git a/Telegram/Resources/icons/info/edit/expand_arrow_small.png b/Telegram/Resources/icons/info/edit/expand_arrow_small.png new file mode 100644 index 000000000..839b55ad0 Binary files /dev/null and b/Telegram/Resources/icons/info/edit/expand_arrow_small.png differ diff --git a/Telegram/Resources/icons/info/edit/expand_arrow_small@2x.png b/Telegram/Resources/icons/info/edit/expand_arrow_small@2x.png new file mode 100644 index 000000000..ba6eda83b Binary files /dev/null and b/Telegram/Resources/icons/info/edit/expand_arrow_small@2x.png differ diff --git a/Telegram/Resources/icons/info/edit/expand_arrow_small@3x.png b/Telegram/Resources/icons/info/edit/expand_arrow_small@3x.png new file mode 100644 index 000000000..993b88a48 Binary files /dev/null and b/Telegram/Resources/icons/info/edit/expand_arrow_small@3x.png differ diff --git a/Telegram/SourceFiles/boxes/peers/edit_peer_permissions_box.cpp b/Telegram/SourceFiles/boxes/peers/edit_peer_permissions_box.cpp index 884793059..b72de130f 100644 --- a/Telegram/SourceFiles/boxes/peers/edit_peer_permissions_box.cpp +++ b/Telegram/SourceFiles/boxes/peers/edit_peer_permissions_box.cpp @@ -248,20 +248,24 @@ not_null SendMediaToggle( label->setAttribute(Qt::WA_TransparentForMouseEvents); const auto arrow = Ui::CreateChild(button); { - const auto size = st::mainMenuToggleSize * 4; - arrow->resize(size, size); + const auto &icon = st::permissionsExpandIcon; + arrow->resize(icon.size()); arrow->paintRequest( - ) | rpl::start_with_next([=] { + ) | rpl::start_with_next([=, &icon] { auto p = QPainter(arrow); - const auto path = Ui::ToggleUpDownArrowPath( - size / 2., - size / 2., - size / 4., - st::mainMenuToggleFourStrokes, - state->animation.value(wrap->toggled() ? 1. : 0.)); - - auto hq = PainterHighQualityEnabler(p); - p.fillPath(path, st::rightsButton.textFg); + const auto center = QPointF( + icon.width() / 2., + icon.height() / 2.); + const auto progress = state->animation.value( + wrap->toggled() ? 1. : 0.); + auto hq = std::optional(); + if (progress > 0.) { + hq.emplace(p); + p.translate(center); + p.rotate(progress * 180.); + p.translate(-center); + } + icon.paint(p, 0, 0, arrow->width()); }, arrow->lifetime()); } button->sizeValue( diff --git a/Telegram/SourceFiles/info/info.style b/Telegram/SourceFiles/info/info.style index 3475b4299..dfafc3ef6 100644 --- a/Telegram/SourceFiles/info/info.style +++ b/Telegram/SourceFiles/info/info.style @@ -890,3 +890,5 @@ reportReasonButton: SettingsButton(infoProfileButton) { style: boxTextStyle; padding: margins(62px, 7px, 8px, 7px); } + +permissionsExpandIcon: icon{{ "info/edit/expand_arrow_small", windowBoldFg }};