2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Update some icons.

This commit is contained in:
John Preston
2022-02-25 16:11:49 +03:00
parent aa012b6d0b
commit 1710863231
668 changed files with 180 additions and 272 deletions

View File

@@ -489,44 +489,5 @@ void Cover::refreshStatusGeometry(int newWidth) {
newWidth);
}
QMargins SharedMediaCover::getMargins() const {
return QMargins(0, 0, 0, st::infoSharedMediaBottomSkip);
}
SharedMediaCover::SharedMediaCover(QWidget *parent)
: SectionWithToggle(parent, st::infoSharedMediaCoverHeight) {
createLabel();
}
SharedMediaCover *SharedMediaCover::setToggleShown(rpl::producer<bool> &&shown) {
return static_cast<SharedMediaCover*>(
SectionWithToggle::setToggleShown(std::move(shown)));
}
void SharedMediaCover::createLabel() {
using namespace rpl::mappers;
auto label = object_ptr<Ui::FlatLabel>(
this,
tr::lng_profile_shared_media() | Ui::Text::ToUpper(),
st::infoBlockHeaderLabel);
label->setAttribute(Qt::WA_TransparentForMouseEvents);
rpl::combine(
toggleShownValue(),
widthValue(),
_2
) | rpl::start_with_next([this, weak = label.data()](int newWidth) {
auto availableWidth = newWidth
- st::infoBlockHeaderPosition.x()
- st::infoSharedMediaButton.padding.right()
- toggleSkip();
weak->resizeToWidth(availableWidth);
weak->moveToLeft(
st::infoBlockHeaderPosition.x(),
st::infoBlockHeaderPosition.y(),
newWidth);
}, label->lifetime());
}
} // namespace Profile
} // namespace Info