mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +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()) {
|
if (state->apiCreditsOptions.options().empty()) {
|
||||||
return;
|
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(
|
const auto row = creditsTypeWrap->add(
|
||||||
object_ptr<Giveaway::GiveawayTypeRow>(
|
object_ptr<Giveaway::GiveawayTypeRow>(
|
||||||
|
@ -511,7 +484,7 @@ void CreateGiveawayBox(
|
||||||
st::colorIndexOrange,
|
st::colorIndexOrange,
|
||||||
tr::lng_credits_summary_title(),
|
tr::lng_credits_summary_title(),
|
||||||
tr::lng_giveaway_create_subtitle(),
|
tr::lng_giveaway_create_subtitle(),
|
||||||
std::move(badge)));
|
QImage()));
|
||||||
row->addRadio(typeGroup);
|
row->addRadio(typeGroup);
|
||||||
row->setClickedCallback([=] {
|
row->setClickedCallback([=] {
|
||||||
state->typeValue.force_assign(GiveawayType::Credits);
|
state->typeValue.force_assign(GiveawayType::Credits);
|
||||||
|
|
Loading…
Add table
Reference in a new issue