2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-30 22:16:14 +00:00

Change button round radius.

This commit is contained in:
John Preston
2020-12-08 11:19:23 +04:00
parent a527d5c535
commit dde94d486b
20 changed files with 80 additions and 80 deletions

View File

@@ -597,8 +597,8 @@ void StickerSetBox::Inner::paintEvent(QPaintEvent *e) {
QSize StickerSetBox::Inner::boundingBoxSize() const {
return QSize(
st::stickersSize.width() - st::buttonRadius * 2,
st::stickersSize.height() - st::buttonRadius * 2);
st::stickersSize.width() - st::roundRadiusSmall * 2,
st::stickersSize.height() - st::roundRadiusSmall * 2);
}
void StickerSetBox::Inner::visibleTopBottomUpdated(
@@ -684,7 +684,7 @@ void StickerSetBox::Inner::paintSticker(
w = std::max(size.width(), 1);
h = std::max(size.height(), 1);
} else {
auto coef = qMin((st::stickersSize.width() - st::buttonRadius * 2) / float64(document->dimensions.width()), (st::stickersSize.height() - st::buttonRadius * 2) / float64(document->dimensions.height()));
auto coef = qMin((st::stickersSize.width() - st::roundRadiusSmall * 2) / float64(document->dimensions.width()), (st::stickersSize.height() - st::roundRadiusSmall * 2) / float64(document->dimensions.height()));
if (coef > 1) coef = 1;
w = std::max(qRound(coef * document->dimensions.width()), 1);
h = std::max(qRound(coef * document->dimensions.height()), 1);