mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-15 13:47:05 +02:00
Removed unused badge in giveaway box.
This commit is contained in:
parent
14672ff145
commit
08df3b2dff
1 changed files with 1 additions and 28 deletions
|
@ -476,33 +476,6 @@ void CreateGiveawayBox(
|
|||
if (state->apiCreditsOptions.options().empty()) {
|
||||
return;
|
||||
}
|
||||
static constexpr auto kOutdated = 1735689600;
|
||||
|
||||
auto badge = [&] {
|
||||
if (base::unixtime::now() > kOutdated) {
|
||||
return QImage();
|
||||
}
|
||||
const auto badge = Ui::CreateChild<Ui::PaddingWrap<>>(
|
||||
creditsTypeWrap,
|
||||
object_ptr<Ui::FlatLabel>(
|
||||
creditsTypeWrap,
|
||||
tr::lng_premium_summary_new_badge(tr::now),
|
||||
st::settingsPremiumNewBadge),
|
||||
st::settingsPremiumNewBadgePadding);
|
||||
badge->setAttribute(Qt::WA_TransparentForMouseEvents);
|
||||
badge->paintRequest() | rpl::start_with_next([=] {
|
||||
auto p = QPainter(badge);
|
||||
auto hq = PainterHighQualityEnabler(p);
|
||||
p.setPen(Qt::NoPen);
|
||||
p.setBrush(st::windowBgActive);
|
||||
const auto r = st::settingsPremiumNewBadgePadding.left();
|
||||
p.drawRoundedRect(badge->rect(), r, r);
|
||||
}, badge->lifetime());
|
||||
badge->show();
|
||||
auto result = Ui::GrabWidget(badge).toImage();
|
||||
badge->hide();
|
||||
return result;
|
||||
}();
|
||||
|
||||
const auto row = creditsTypeWrap->add(
|
||||
object_ptr<Giveaway::GiveawayTypeRow>(
|
||||
|
@ -511,7 +484,7 @@ void CreateGiveawayBox(
|
|||
st::colorIndexOrange,
|
||||
tr::lng_credits_summary_title(),
|
||||
tr::lng_giveaway_create_subtitle(),
|
||||
std::move(badge)));
|
||||
QImage()));
|
||||
row->addRadio(typeGroup);
|
||||
row->setClickedCallback([=] {
|
||||
state->typeValue.force_assign(GiveawayType::Credits);
|
||||
|
|
Loading…
Add table
Reference in a new issue