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

Simplify media overview layouts.

This commit is contained in:
John Preston
2020-05-21 16:49:47 +04:00
parent 053eace154
commit 58f82620e0
6 changed files with 23 additions and 82 deletions

View File

@@ -140,11 +140,6 @@ void Checkbox::startAnimation() {
_pression.start(_updateCallback, showPressed ? 0. : 1., showPressed ? 1. : 0., st::overviewCheck.duration);
}
MsgId AbstractItem::msgId() const {
auto item = getItem();
return item ? item->id : 0;
}
ItemBase::ItemBase(
not_null<Delegate*> delegate,
not_null<HistoryItem*> parent)
@@ -295,25 +290,6 @@ void StatusText::setSize(int newSize) {
_size = newSize;
}
Date::Date(const QDate &date, bool month)
: _date(date)
, _text(month ? langMonthFull(date) : langDayOfMonthFull(date)) {
AddComponents(Info::Bit());
}
void Date::initDimensions() {
_maxw = st::normalFont->width(_text);
_minh = st::linksDateMargin.top() + st::normalFont->height + st::linksDateMargin.bottom() + st::linksBorder;
}
void Date::paint(Painter &p, const QRect &clip, TextSelection selection, const PaintContext *context) {
if (clip.intersects(QRect(0, st::linksDateMargin.top(), _width, st::normalFont->height))) {
p.setPen(st::linksDateColor);
p.setFont(st::semiboldFont);
p.drawTextLeft(0, st::linksDateMargin.top(), _width, _text);
}
}
Photo::Photo(
not_null<Delegate*> delegate,
not_null<HistoryItem*> parent,