mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Fixed paint of mini icon in dialogs list even there is no space for it.
This commit is contained in:
parent
7740780eeb
commit
738aff9c4f
1 changed files with 15 additions and 9 deletions
|
@ -328,15 +328,23 @@ void MessageView::paint(
|
||||||
*_leftIcon,
|
*_leftIcon,
|
||||||
context.active,
|
context.active,
|
||||||
context.selected);
|
context.selected);
|
||||||
if (_hasPlainLinkAtBegin && !context.active) {
|
const auto w = (icon.width());
|
||||||
icon.paint(p, rect.topLeft(), rect.width(), palette->linkFg->c);
|
if (rect.width() > w) {
|
||||||
} else {
|
if (_hasPlainLinkAtBegin && !context.active) {
|
||||||
icon.paint(p, rect.topLeft(), rect.width());
|
icon.paint(
|
||||||
|
p,
|
||||||
|
rect.topLeft(),
|
||||||
|
rect.width(),
|
||||||
|
palette->linkFg->c);
|
||||||
|
} else {
|
||||||
|
icon.paint(p, rect.topLeft(), rect.width());
|
||||||
|
}
|
||||||
|
rect.setLeft(rect.x() + w + st::dialogsMiniIconSkip);
|
||||||
}
|
}
|
||||||
rect.setLeft(rect.x() + icon.width() + st::dialogsMiniIconSkip);
|
|
||||||
}
|
}
|
||||||
for (const auto &image : _imagesCache) {
|
for (const auto &image : _imagesCache) {
|
||||||
if (rect.width() < st::dialogsMiniPreview) {
|
const auto w = st::dialogsMiniPreview + st::dialogsMiniPreviewSkip;
|
||||||
|
if (rect.width() < w) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
const auto mini = QRect(
|
const auto mini = QRect(
|
||||||
|
@ -352,9 +360,7 @@ void MessageView::paint(
|
||||||
FillSpoilerRect(p, mini, frame);
|
FillSpoilerRect(p, mini, frame);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
rect.setLeft(rect.x()
|
rect.setLeft(rect.x() + w);
|
||||||
+ st::dialogsMiniPreview
|
|
||||||
+ st::dialogsMiniPreviewSkip);
|
|
||||||
}
|
}
|
||||||
if (!_imagesCache.empty()) {
|
if (!_imagesCache.empty()) {
|
||||||
rect.setLeft(rect.x() + st::dialogsMiniPreviewRight);
|
rect.setLeft(rect.x() + st::dialogsMiniPreviewRight);
|
||||||
|
|
Loading…
Add table
Reference in a new issue