Improved text padding in ShowOrPremiumBox.

This commit is contained in:
23rd 2024-08-18 12:41:00 +03:00
parent 8349cb0dd4
commit f650c679e0

View File

@ -143,45 +143,46 @@ void ShowOrPremiumBox(
box->closeBox(); box->closeBox();
}); });
const auto buttonPadding = QMargins(
st::showOrBox.buttonPadding.left(),
0,
st::showOrBox.buttonPadding.right(),
0);
box->addRow(MakeShowOrPremiumIcon(box, skin.icon)); box->addRow(MakeShowOrPremiumIcon(box, skin.icon));
box->addRow( box->addRow(
object_ptr<FlatLabel>( object_ptr<FlatLabel>(
box, box,
std::move(skin.showTitle), std::move(skin.showTitle),
st::boostCenteredTitle), st::boostCenteredTitle),
st::showOrTitlePadding); st::showOrTitlePadding + buttonPadding);
box->addRow( box->addRow(
object_ptr<FlatLabel>( object_ptr<FlatLabel>(
box, box,
std::move(skin.showAbout), std::move(skin.showAbout),
st::boostText), st::boostText),
st::showOrAboutPadding); st::showOrAboutPadding + buttonPadding);
const auto show = box->addRow( const auto show = box->addRow(
object_ptr<RoundButton>( object_ptr<RoundButton>(
box, box,
std::move(skin.showButton), std::move(skin.showButton),
st::showOrShowButton), st::showOrShowButton),
QMargins( buttonPadding);
st::showOrBox.buttonPadding.left(),
0,
st::showOrBox.buttonPadding.right(),
0));
show->setTextTransform(RoundButton::TextTransform::NoTransform); show->setTextTransform(RoundButton::TextTransform::NoTransform);
box->addRow( box->addRow(
MakeShowOrLabel(box, std::move(skin.orPremium)), MakeShowOrLabel(box, std::move(skin.orPremium)),
st::showOrLabelPadding); st::showOrLabelPadding + buttonPadding);
box->addRow( box->addRow(
object_ptr<FlatLabel>( object_ptr<FlatLabel>(
box, box,
std::move(skin.premiumTitle), std::move(skin.premiumTitle),
st::boostCenteredTitle), st::boostCenteredTitle),
st::showOrTitlePadding); st::showOrTitlePadding + buttonPadding);
box->addRow( box->addRow(
object_ptr<FlatLabel>( object_ptr<FlatLabel>(
box, box,
std::move(skin.premiumAbout), std::move(skin.premiumAbout),
st::boostText), st::boostText),
st::showOrPremiumAboutPadding); st::showOrPremiumAboutPadding + buttonPadding);
const auto premium = CreateChild<GradientButton>( const auto premium = CreateChild<GradientButton>(
box.get(), box.get(),