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

Use Semibold in names, use Bold in messages.

Fixes #7813, fixes #7823.
This commit is contained in:
John Preston
2020-05-08 12:12:43 +04:00
parent 36997f084a
commit 0251f58bf2
7 changed files with 30 additions and 10 deletions

View File

@@ -55,13 +55,27 @@ TextWithEntities ComposeNameWithEntities(DocumentData *document) {
result.text = document->filename().isEmpty()
? qsl("Unknown File")
: document->filename();
result.entities.push_back({ EntityType::Bold, 0, result.text.size() });
result.entities.push_back({
EntityType::Semibold,
0,
result.text.size()
});
} else if (song->performer.isEmpty()) {
result.text = song->title;
result.entities.push_back({ EntityType::Bold, 0, result.text.size() });
result.entities.push_back({
EntityType::Semibold,
0,
result.text.size()
});
} else {
result.text = song->performer + QString::fromUtf8(" \xe2\x80\x93 ") + (song->title.isEmpty() ? qsl("Unknown Track") : song->title);
result.entities.push_back({ EntityType::Bold, 0, song->performer.size() });
result.text = song->performer
+ QString::fromUtf8(" \xe2\x80\x93 ")
+ (song->title.isEmpty() ? qsl("Unknown Track") : song->title);
result.entities.push_back({
EntityType::Semibold,
0,
song->performer.size()
});
}
return result;
}