mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-14 13:17:08 +02:00
Improved style of tabs for boost gifts in boosts section.
This commit is contained in:
parent
7dd1e9bfbe
commit
5eb59a1a43
1 changed files with 15 additions and 2 deletions
|
@ -35,9 +35,11 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "ui/vertical_list.h"
|
||||
#include "ui/widgets/buttons.h"
|
||||
#include "ui/widgets/labels.h"
|
||||
#include "ui/widgets/shadow.h"
|
||||
#include "ui/widgets/slider_natural_width.h"
|
||||
#include "ui/wrap/slide_wrap.h"
|
||||
#include "ui/ui_utility.h"
|
||||
#include "styles/style_dialogs.h" // dialogsSearchTabs
|
||||
#include "styles/style_giveaway.h"
|
||||
#include "styles/style_info.h"
|
||||
#include "styles/style_premium.h"
|
||||
|
@ -430,7 +432,7 @@ void InnerWidget::fill() {
|
|||
#else
|
||||
const auto hasOneTab = (hasBoosts != hasGifts);
|
||||
#endif
|
||||
const auto boostsTabText = tr::lng_boosts_list_title(
|
||||
const auto boostsTabText = tr::lng_giveaway_quantity(
|
||||
tr::now,
|
||||
lt_count,
|
||||
status.firstSliceBoosts.multipliedTotal);
|
||||
|
@ -454,8 +456,19 @@ void InnerWidget::fill() {
|
|||
inner,
|
||||
object_ptr<Ui::CustomWidthSlider>(
|
||||
inner,
|
||||
st::defaultTabsSlider)),
|
||||
st::dialogsSearchTabs)),
|
||||
st::boxRowPadding);
|
||||
if (const auto shadow = Ui::CreateChild<Ui::PlainShadow>(inner)) {
|
||||
shadow->show();
|
||||
slider->geometryValue(
|
||||
) | rpl::start_with_next([=](const QRect &r) {
|
||||
shadow->setGeometry(
|
||||
inner->x(),
|
||||
rect::bottom(r) - shadow->height(),
|
||||
inner->width(),
|
||||
shadow->height());
|
||||
}, shadow->lifetime());
|
||||
}
|
||||
slider->toggle(!hasOneTab, anim::type::instant);
|
||||
|
||||
slider->entity()->addSection(boostsTabText);
|
||||
|
|
Loading…
Add table
Reference in a new issue