Fix title alignment in AskBoostBox.

This commit is contained in:
John Preston 2023-11-15 14:48:09 +04:00
parent 25216a140e
commit af6e15ed59
2 changed files with 5 additions and 4 deletions

View File

@ -28,9 +28,7 @@ namespace {
const auto exact = (data.boosts == data.thisLevelBoosts);
const auto reached = !data.nextLevelBoosts || (exact && data.mine > 0);
if (reached) {
if (data.nextLevelBoosts) {
--data.level;
}
--data.level;
data.boosts = data.nextLevelBoosts = std::max({
data.boosts,
data.thisLevelBoosts,
@ -483,7 +481,7 @@ void AskBoostBox(
object_ptr<Ui::FlatLabel>(
box,
std::move(title),
st::boostTitle),
st::boostCenteredTitle),
st::boxRowPadding + QMargins(0, st::boostTitleSkip, 0, 0));
box->addRow(
object_ptr<Ui::FlatLabel>(

View File

@ -258,6 +258,9 @@ boostTitleBadge: FlatLabel(defaultFlatLabel) {
textFg: premiumButtonFg;
}
boostTitleBadgeSkip: 6px;
boostCenteredTitle: FlatLabel(boostTitle) {
align: align(top);
}
boostTextSkip: 5px;
boostText: FlatLabel(defaultFlatLabel) {
minWidth: 40px;