Slightly improved style of mini icons in dialogs list.

This commit is contained in:
23rd 2023-09-07 12:29:55 +03:00
parent 29bfe43386
commit adbe5e9605
2 changed files with 7 additions and 2 deletions

View File

@ -468,6 +468,7 @@ dialogsMiniForwardIcon: ThreeStateIcon {
active: icon {{ "mini_forward", dialogsTextFgActive, point(0px, 1px) }};
}
dialogsMiniIconSkip: 2px;
dialogsMiniIconTextSkip: 1px;
dialogsMiniReplyStoryIcon: ThreeStateIcon {
icon: icon {{ "mini_reply_story", dialogsTextFg, point(0px, 1px) }};
over: icon {{ "mini_reply_story", dialogsTextFgOver, point(0px, 1px) }};

View File

@ -316,7 +316,7 @@ void MessageView::paint(
.elisionLines = lines,
});
rect.setLeft(rect.x() + _senderCache.maxWidth());
if (!_imagesCache.empty()) {
if (!_imagesCache.empty() && !_leftIcon) {
const auto skip = st::dialogsMiniPreviewSkip
+ st::dialogsMiniPreviewRight;
rect.setLeft(rect.x() + skip);
@ -339,7 +339,11 @@ void MessageView::paint(
} else {
icon.paint(p, rect.topLeft(), rect.width());
}
rect.setLeft(rect.x() + w + st::dialogsMiniIconSkip);
rect.setLeft(rect.x()
+ w
+ (_imagesCache.empty()
? st::dialogsMiniIconTextSkip
: st::dialogsMiniIconSkip));
}
}
for (const auto &image : _imagesCache) {