Date dividers between messages from different dates

This commit is contained in:
Blue 2021-09-22 01:17:43 +03:00
parent 5f925217fc
commit 3f09b8f838
Signed by untrusted user: blue
GPG key ID: 9B203B252A63EE38
5 changed files with 78 additions and 4 deletions

View file

@ -73,6 +73,7 @@ protected:
private:
bool tryToCalculateGeometriesWithNoScrollbars(const QStyleOptionViewItem& option, const QAbstractItemModel* model, uint32_t totalHeight);
void positionProgress();
void drawDateDevider(int top, const QDateTime& date, QPainter& painter);
private:
struct Hint {
@ -87,6 +88,8 @@ private:
bool clearWidgetsMode;
Models::MessageFeed::SyncState modelState;
Progress progress;
QFont dividerFont;
QFontMetrics dividerMetrics;
static const std::set<int> geometryChangingRoles;