mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 14:38:15 +00:00
half of all boxes redesigned
This commit is contained in:
@@ -170,8 +170,8 @@ void ConfirmBox::paintEvent(QPaintEvent *e) {
|
||||
}
|
||||
|
||||
void ConfirmBox::resizeEvent(QResizeEvent *e) {
|
||||
_confirm.moveToRight(st::boxButtonPadding.right(), height() - st::boxButtonPadding.bottom() - _confirm.height(), width());
|
||||
_cancel.moveToRight(st::boxButtonPadding.right() + _confirm.width() + st::boxButtonPadding.left(), _confirm.y(), width());
|
||||
_confirm.moveToRight(st::boxButtonPadding.right(), height() - st::boxButtonPadding.bottom() - _confirm.height());
|
||||
_cancel.moveToRight(st::boxButtonPadding.right() + _confirm.width() + st::boxButtonPadding.left(), _confirm.y());
|
||||
}
|
||||
|
||||
ConfirmLinkBox::ConfirmLinkBox(const QString &url) : ConfirmBox(lang(lng_open_this_link) + qsl("\n\n") + url, lang(lng_open_link)), _url(url) {
|
||||
@@ -196,7 +196,7 @@ a_goodOpacity(0, 0), a_good(animFunc(this, &MaxInviteBox::goodAnimStep)) {
|
||||
|
||||
_textWidth = st::boxWidth - st::boxPadding.left() - st::boxPadding.right();
|
||||
_textHeight = qMin(_text.countHeight(_textWidth), 16 * int(st::boxTextStyle.lineHeight));
|
||||
setMaxHeight(st::boxPadding.top() + _textHeight + st::newGroupLinkPadding.top() + st::newGroupLink.height + st::newGroupLinkPadding.bottom() + _close.height() + st::boxButtonPadding.bottom());
|
||||
setMaxHeight(st::boxPadding.top() + _textHeight + st::boxTextFont->height + st::boxTextFont->height * 2 + st::newGroupLinkPadding.bottom() + _close.height() + st::boxButtonPadding.bottom());
|
||||
|
||||
connect(&_close, SIGNAL(clicked()), this, SLOT(onClose()));
|
||||
|
||||
@@ -269,13 +269,13 @@ void MaxInviteBox::paintEvent(QPaintEvent *e) {
|
||||
if (!_goodTextLink.isEmpty() && a_goodOpacity.current() > 0) {
|
||||
p.setOpacity(a_goodOpacity.current());
|
||||
p.setPen(st::setGoodColor->p);
|
||||
p.setFont(st::setErrFont->f);
|
||||
p.drawText(QRect(st::newGroupPadding.left(), st::boxPadding.top() + _textHeight + st::newGroupLinkTop + st::newGroupLinkFont->height - st::setErrFont->ascent, width() - st::newGroupPadding.left() - st::newGroupPadding.right(), st::setErrFont->height), _goodTextLink, style::al_top);
|
||||
p.setFont(st::boxTextFont->f);
|
||||
p.drawTextLeft(st::boxPadding.left(), height() - st::boxButtonPadding.bottom() - _close.height() + st::defaultBoxButton.textTop + st::defaultBoxButton.font->ascent - st::boxTextFont->ascent, width(), _goodTextLink);
|
||||
p.setOpacity(1);
|
||||
}
|
||||
}
|
||||
|
||||
void MaxInviteBox::resizeEvent(QResizeEvent *e) {
|
||||
_close.moveToRight(st::boxButtonPadding.right(), height() - st::boxButtonPadding.bottom() - _close.height(), width());
|
||||
_invitationLink = QRect(st::newGroupPadding.left(), st::boxPadding.top() + _textHeight + st::newGroupLinkPadding.top() + (st::newGroupLink.height / 2) - st::newGroupLinkFont->height, width() - st::newGroupPadding.left() - st::newGroupPadding.right(), 2 * st::newGroupLinkFont->height);
|
||||
_close.moveToRight(st::boxButtonPadding.right(), height() - st::boxButtonPadding.bottom() - _close.height());
|
||||
_invitationLink = myrtlrect(st::boxPadding.left(), st::boxPadding.top() + _textHeight + st::boxTextFont->height, width() - st::boxPadding.left() - (st::boxButtonPadding.right() - (st::defaultBoxButton.width / 2)), 2 * st::boxTextFont->height);
|
||||
}
|
||||
|
Reference in New Issue
Block a user