mirror of
https://github.com/telegramdesktop/tdesktop
synced 2024-12-27 09:03:02 +00:00
parent
294ed1bb17
commit
4559888113
@ -71,8 +71,9 @@ void SessionsBox::gotAuthorizations(const MTPaccount_Authorizations &result) {
|
||||
_shortPollRequest = 0;
|
||||
setLoading(false);
|
||||
|
||||
auto availCurrent = st::boxWideWidth - st::sessionPadding.left() - st::sessionTerminateSkip;
|
||||
auto availOther = availCurrent - st::sessionTerminate.iconPosition.x();// -st::sessionTerminate.width - st::sessionTerminateSkip;
|
||||
const auto availCurrent = st::boxWideWidth - st::sessionPadding.left() - st::sessionTerminateSkip;
|
||||
const auto availOther = availCurrent - st::sessionTerminate.iconPosition.x();
|
||||
const auto availInfo = availCurrent - st::sessionTerminate.width;
|
||||
|
||||
_list.clear();
|
||||
if (result.type() != mtpc_account_authorizations) {
|
||||
@ -165,8 +166,8 @@ void SessionsBox::gotAuthorizations(const MTPaccount_Authorizations &result) {
|
||||
data.nameWidth = st::sessionNameFont->width(data.name);
|
||||
}
|
||||
data.infoWidth = st::sessionInfoFont->width(data.info);
|
||||
if (data.infoWidth > availOther) {
|
||||
data.info = st::sessionInfoFont->elided(data.info, availOther);
|
||||
if (data.infoWidth > availInfo) {
|
||||
data.info = st::sessionInfoFont->elided(data.info, availInfo);
|
||||
data.infoWidth = st::sessionInfoFont->width(data.info);
|
||||
}
|
||||
data.ipWidth = st::sessionInfoFont->width(data.ip);
|
||||
@ -243,8 +244,8 @@ void SessionsBox::Inner::paintEvent(QPaintEvent *e) {
|
||||
return;
|
||||
}
|
||||
|
||||
p.translate(0, st::sessionCurrentPadding.top());
|
||||
if (r.y() <= st::sessionCurrentHeight) {
|
||||
p.translate(0, st::sessionCurrentPadding.top());
|
||||
p.setFont(st::sessionNameFont);
|
||||
p.setPen(st::sessionNameFg);
|
||||
p.drawTextLeft(x, st::sessionPadding.top(), w, _current->name, _current->nameWidth);
|
||||
|
Loading…
Reference in New Issue
Block a user