diff --git a/Telegram/SourceFiles/history/view/media/history_view_media.cpp b/Telegram/SourceFiles/history/view/media/history_view_media.cpp index 28e4e0870..ddd76f945 100644 --- a/Telegram/SourceFiles/history/view/media/history_view_media.cpp +++ b/Telegram/SourceFiles/history/view/media/history_view_media.cpp @@ -243,22 +243,23 @@ void Media::drawPurchasedTag( const auto st = context.st; const auto sti = context.imageStyle(); + const auto &padding = st::purchasedTagPadding; auto right = outer.x() + outer.width(); auto top = outer.y(); - right -= st::msgDateImgDelta + st::msgDateImgPadding.x(); - top += st::msgDateImgDelta + st::msgDateImgPadding.y(); + right -= st::msgDateImgDelta + padding.right(); + top += st::msgDateImgDelta + padding.top(); const auto size = QSize( purchased->text.maxWidth(), st::normalFont->height); const auto tagX = right - size.width(); const auto tagY = top; - const auto tagW = size.width() + 2 * st::msgDateImgPadding.x(); - const auto tagH = size.height() + 2 * st::msgDateImgPadding.y(); + const auto tagW = padding.left() + size.width() + padding.right(); + const auto tagH = padding.top() + size.height() + padding.bottom(); Ui::FillRoundRect( p, - tagX - st::msgDateImgPadding.x(), - tagY - st::msgDateImgPadding.y(), + tagX - padding.left(), + tagY - padding.top(), tagW, tagH, sti->msgDateImgBg, @@ -268,7 +269,7 @@ void Media::drawPurchasedTag( purchased->text.draw(p, { .position = { tagX, tagY }, .outerWidth = width(), - .availableWidth = tagW - 2 * st::msgDateImgPadding.x(), + .availableWidth = size.width(), .palette = &st->priceTagTextPalette(), }); } diff --git a/Telegram/SourceFiles/ui/chat/chat.style b/Telegram/SourceFiles/ui/chat/chat.style index a817f5dfe..27b9e36c1 100644 --- a/Telegram/SourceFiles/ui/chat/chat.style +++ b/Telegram/SourceFiles/ui/chat/chat.style @@ -1144,3 +1144,4 @@ factcheckField: InputField(defaultInputField) { style: defaultTextStyle; } +purchasedTagPadding: margins(3px, 2px, 6px, 2px); diff --git a/Telegram/SourceFiles/ui/effects/credits.style b/Telegram/SourceFiles/ui/effects/credits.style index acfde082f..e78642348 100644 --- a/Telegram/SourceFiles/ui/effects/credits.style +++ b/Telegram/SourceFiles/ui/effects/credits.style @@ -46,4 +46,4 @@ creditsBoxButtonLabel: FlatLabel(defaultFlatLabel) { } starIconSmall: icon{{ "payments/small_star", windowFg }}; -starIconSmallPadding: margins(0px, -3px, 0px, 0px); +starIconSmallPadding: margins(0px, -2px, 0px, 0px);