mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-30 22:16:14 +00:00
Using standard library instead of std_ namespace.
Currently tested only in VS2015.
This commit is contained in:
@@ -118,16 +118,16 @@ void StickersBox::CounterWidget::updateCounter() {
|
||||
template <typename ...Args>
|
||||
StickersBox::Tab::Tab(int index, Args&&... args)
|
||||
: _index(index)
|
||||
, _widget(std_::forward<Args>(args)...)
|
||||
, _widget(std::forward<Args>(args)...)
|
||||
, _weak(_widget) {
|
||||
}
|
||||
|
||||
object_ptr<StickersBox::Inner> StickersBox::Tab::takeWidget() {
|
||||
return std_::move(_widget);
|
||||
return std::move(_widget);
|
||||
}
|
||||
|
||||
void StickersBox::Tab::returnWidget(object_ptr<Inner> widget) {
|
||||
_widget = std_::move(widget);
|
||||
_widget = std::move(widget);
|
||||
t_assert(_widget == _weak);
|
||||
}
|
||||
|
||||
@@ -398,7 +398,7 @@ void StickersBox::switchTab() {
|
||||
auto widget = takeInnerWidget<Inner>();
|
||||
widget->setParent(this);
|
||||
widget->hide();
|
||||
_tab->returnWidget(std_::move(widget));
|
||||
_tab->returnWidget(std::move(widget));
|
||||
_tab = newTab;
|
||||
_section = newSection;
|
||||
setInnerWidget(_tab->takeWidget(), getTopSkip());
|
||||
@@ -410,8 +410,8 @@ void StickersBox::switchTab() {
|
||||
auto nowCache = grabContentCache();
|
||||
auto nowIndex = _tab->index();
|
||||
|
||||
_slideAnimation = std_::make_unique<Ui::SlideAnimation>();
|
||||
_slideAnimation->setSnapshots(std_::move(wasCache), std_::move(nowCache));
|
||||
_slideAnimation = std::make_unique<Ui::SlideAnimation>();
|
||||
_slideAnimation->setSnapshots(std::move(wasCache), std::move(nowCache));
|
||||
auto slideLeft = wasIndex > nowIndex;
|
||||
_slideAnimation->start(slideLeft, [this] { update(); }, st::slideDuration);
|
||||
setInnerVisible(false);
|
||||
@@ -425,7 +425,7 @@ QPixmap StickersBox::grabContentCache() {
|
||||
_tabs->hide();
|
||||
auto result = grabInnerCache();
|
||||
_tabs->show();
|
||||
return std_::move(result);
|
||||
return std::move(result);
|
||||
}
|
||||
|
||||
void StickersBox::installSet(uint64 setId) {
|
||||
@@ -796,16 +796,16 @@ void StickersBox::Inner::setActionDown(int newActionDown) {
|
||||
if (set->removed) {
|
||||
auto rippleSize = QSize(_undoWidth - st::stickersUndoRemove.width, st::stickersUndoRemove.height);
|
||||
auto rippleMask = Ui::RippleAnimation::roundRectMask(rippleSize, st::buttonRadius);
|
||||
ensureRipple(st::stickersUndoRemove.ripple, std_::move(rippleMask), removeButton);
|
||||
ensureRipple(st::stickersUndoRemove.ripple, std::move(rippleMask), removeButton);
|
||||
} else {
|
||||
auto rippleSize = st::stickersRemove.rippleAreaSize;
|
||||
auto rippleMask = Ui::RippleAnimation::ellipseMask(QSize(rippleSize, rippleSize));
|
||||
ensureRipple(st::stickersRemove.ripple, std_::move(rippleMask), removeButton);
|
||||
ensureRipple(st::stickersRemove.ripple, std::move(rippleMask), removeButton);
|
||||
}
|
||||
} else if (!set->installed || set->archived || set->removed) {
|
||||
auto rippleSize = QSize(_addWidth - st::stickersTrendingAdd.width, st::stickersTrendingAdd.height);
|
||||
auto rippleMask = Ui::RippleAnimation::roundRectMask(rippleSize, st::buttonRadius);
|
||||
ensureRipple(st::stickersTrendingAdd.ripple, std_::move(rippleMask), removeButton);
|
||||
ensureRipple(st::stickersTrendingAdd.ripple, std::move(rippleMask), removeButton);
|
||||
}
|
||||
}
|
||||
if (set->ripple) {
|
||||
@@ -816,7 +816,7 @@ void StickersBox::Inner::setActionDown(int newActionDown) {
|
||||
}
|
||||
|
||||
void StickersBox::Inner::ensureRipple(const style::RippleAnimation &st, QImage mask, bool removeButton) {
|
||||
_rows[_actionDown]->ripple = MakeShared<Ui::RippleAnimation>(st, std_::move(mask), [this, index = _actionDown, removeButton] {
|
||||
_rows[_actionDown]->ripple = MakeShared<Ui::RippleAnimation>(st, std::move(mask), [this, index = _actionDown, removeButton] {
|
||||
update(myrtlrect(relativeButtonRect(removeButton).translated(0, _itemsTop + index * _rowHeight)));
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user