Skip to content

Commit

Permalink
Fix title alignment in AskBoostBox.
Browse files Browse the repository at this point in the history
  • Loading branch information
john-preston committed Nov 16, 2023
1 parent 25216a1 commit af6e15e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Telegram/SourceFiles/ui/boxes/boost_box.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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>(
Expand Down
3 changes: 3 additions & 0 deletions Telegram/SourceFiles/ui/effects/premium.style
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,9 @@ boostTitleBadge: FlatLabel(defaultFlatLabel) {
textFg: premiumButtonFg;
}
boostTitleBadgeSkip: 6px;
boostCenteredTitle: FlatLabel(boostTitle) {
align: align(top);
}
boostTextSkip: 5px;
boostText: FlatLabel(defaultFlatLabel) {
minWidth: 40px;
Expand Down

0 comments on commit af6e15e

Please sign in to comment.