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

Improve name elision in the main menu cover.

This commit is contained in:
John Preston
2022-03-16 11:23:37 +04:00
parent 4f44692ae8
commit db6a9b0354

View File

@@ -253,10 +253,12 @@ void MainMenu::ToggleAccountsButton::validateUnreadBadge() {
}
_unreadBadge = computeUnreadBadge();
auto st = Settings::BadgeStyle();
_rightSkip = base
+ Dialogs::Ui::CountUnreadBadgeSize(_unreadBadge, st).width()
+ 2 * st::mainMenuToggleSize;
_rightSkip = base;
if (!_unreadBadge.isEmpty()) {
const auto st = Settings::BadgeStyle();
_rightSkip += 2 * st::mainMenuToggleSize
+ Dialogs::Ui::CountUnreadBadgeSize(_unreadBadge, st).width();
}
}
QString MainMenu::ToggleAccountsButton::computeUnreadBadge() const {