mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-06 15:13:57 +02:00
Use Ui::Text::String in Ui::RoundButton.
This commit is contained in:
parent
ec28f258fb
commit
f79d70d112
27 changed files with 93 additions and 65 deletions
|
@ -787,7 +787,7 @@ backgroundConfirmPadding: margins(24px, 16px, 24px, 16px);
|
||||||
backgroundConfirm: RoundButton(defaultActiveButton) {
|
backgroundConfirm: RoundButton(defaultActiveButton) {
|
||||||
height: 44px;
|
height: 44px;
|
||||||
textTop: 12px;
|
textTop: 12px;
|
||||||
font: font(13px semibold);
|
style: semiboldTextStyle;
|
||||||
}
|
}
|
||||||
backgroundConfirmCancel: RoundButton(backgroundConfirm) {
|
backgroundConfirmCancel: RoundButton(backgroundConfirm) {
|
||||||
textFg: mediaviewSaveMsgFg;
|
textFg: mediaviewSaveMsgFg;
|
||||||
|
@ -799,7 +799,7 @@ backgroundConfirmCancel: RoundButton(backgroundConfirm) {
|
||||||
|
|
||||||
height: 44px;
|
height: 44px;
|
||||||
textTop: 12px;
|
textTop: 12px;
|
||||||
font: font(13px semibold);
|
style: semiboldTextStyle;
|
||||||
|
|
||||||
ripple: RippleAnimation(defaultRippleAnimation) {
|
ripple: RippleAnimation(defaultRippleAnimation) {
|
||||||
color: shadowFg;
|
color: shadowFg;
|
||||||
|
@ -951,7 +951,7 @@ sponsoredUrlButton: RoundButton(defaultActiveButton) {
|
||||||
textFg: historyLinkInFg;
|
textFg: historyLinkInFg;
|
||||||
textFgOver: historyLinkInFg;
|
textFgOver: historyLinkInFg;
|
||||||
textTop: 7px;
|
textTop: 7px;
|
||||||
font: normalFont;
|
style: defaultTextStyle;
|
||||||
|
|
||||||
ripple: RippleAnimation(defaultRippleAnimation) {
|
ripple: RippleAnimation(defaultRippleAnimation) {
|
||||||
color: windowBgOver;
|
color: windowBgOver;
|
||||||
|
|
|
@ -241,8 +241,8 @@ RequestsBoxController::RowHelper::RowHelper(bool isGroup)
|
||||||
? tr::lng_group_requests_add(tr::now)
|
? tr::lng_group_requests_add(tr::now)
|
||||||
: tr::lng_group_requests_add_channel(tr::now))
|
: tr::lng_group_requests_add_channel(tr::now))
|
||||||
, _rejectText(tr::lng_group_requests_dismiss(tr::now))
|
, _rejectText(tr::lng_group_requests_dismiss(tr::now))
|
||||||
, _acceptTextWidth(st::requestsAcceptButton.font->width(_acceptText))
|
, _acceptTextWidth(st::requestsAcceptButton.style.font->width(_acceptText))
|
||||||
, _rejectTextWidth(st::requestsRejectButton.font->width(_rejectText)) {
|
, _rejectTextWidth(st::requestsRejectButton.style.font->width(_rejectText)) {
|
||||||
}
|
}
|
||||||
|
|
||||||
RequestsBoxController::RequestsBoxController(
|
RequestsBoxController::RequestsBoxController(
|
||||||
|
@ -491,7 +491,7 @@ void RequestsBoxController::RowHelper::paintButton(
|
||||||
const auto textLeft = geometry.x()
|
const auto textLeft = geometry.x()
|
||||||
+ ((geometry.width() - textWidth) / 2);
|
+ ((geometry.width() - textWidth) / 2);
|
||||||
const auto textTop = geometry.y() + st.textTop;
|
const auto textTop = geometry.y() + st.textTop;
|
||||||
p.setFont(st.font);
|
p.setFont(st.style.font);
|
||||||
p.setPen(over ? st.textFgOver : st.textFg);
|
p.setPen(over ? st.textFgOver : st.textFg);
|
||||||
p.drawTextLeft(textLeft, textTop, outerWidth, text);
|
p.drawTextLeft(textLeft, textTop, outerWidth, text);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1216,11 +1216,12 @@ StickersBox::Inner::Inner(
|
||||||
})
|
})
|
||||||
, _itemsTop(st::lineWidth)
|
, _itemsTop(st::lineWidth)
|
||||||
, _addText(tr::lng_stickers_featured_add(tr::now))
|
, _addText(tr::lng_stickers_featured_add(tr::now))
|
||||||
, _addWidth(st::stickersTrendingAdd.font->width(_addText))
|
, _addWidth(st::stickersTrendingAdd.style.font->width(_addText))
|
||||||
, _undoText(tr::lng_stickers_return(tr::now))
|
, _undoText(tr::lng_stickers_return(tr::now))
|
||||||
, _undoWidth(st::stickersUndoRemove.font->width(_undoText))
|
, _undoWidth(st::stickersUndoRemove.style.font->width(_undoText))
|
||||||
, _installedText(tr::lng_stickers_featured_installed(tr::now))
|
, _installedText(tr::lng_stickers_featured_installed(tr::now))
|
||||||
, _installedWidth(st::stickersTrendingInstalled.font->width(_installedText)) {
|
, _installedWidth(st::stickersTrendingInstalled.style.font->width(
|
||||||
|
_installedText)) {
|
||||||
setup();
|
setup();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1666,7 +1667,7 @@ void StickersBox::Inner::paintFakeButton(Painter &p, not_null<Row*> row, int ind
|
||||||
row->ripple.reset();
|
row->ripple.reset();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
p.setFont(st.font);
|
p.setFont(st.style.font);
|
||||||
p.setPen(st.textFg);
|
p.setPen(st.textFg);
|
||||||
p.drawTextLeft(rect.x() - (st.width / 2), rect.y() + st.textTop, width(), text, textWidth);
|
p.drawTextLeft(rect.x() - (st.width / 2), rect.y() + st.textTop, width(), text, textWidth);
|
||||||
} else {
|
} else {
|
||||||
|
@ -1700,7 +1701,7 @@ void StickersBox::Inner::paintFakeButton(Painter &p, not_null<Row*> row, int ind
|
||||||
row->ripple.reset();
|
row->ripple.reset();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
p.setFont(st.font);
|
p.setFont(st.style.font);
|
||||||
p.setPen(selected ? st.textFgOver : st.textFg);
|
p.setPen(selected ? st.textFgOver : st.textFg);
|
||||||
p.drawTextLeft(rect.x() - (st.width / 2), rect.y() + st.textTop, width(), text, textWidth);
|
p.drawTextLeft(rect.x() - (st.width / 2), rect.y() + st.textTop, width(), text, textWidth);
|
||||||
}
|
}
|
||||||
|
|
|
@ -296,7 +296,9 @@ emojiPanButton: RoundButton(defaultActiveButton) {
|
||||||
textTop: 2px;
|
textTop: 2px;
|
||||||
}
|
}
|
||||||
emojiPanExpand: RoundButton(defaultActiveButton) {
|
emojiPanExpand: RoundButton(defaultActiveButton) {
|
||||||
|
style: TextStyle(semiboldTextStyle) {
|
||||||
font: font(12px bold);
|
font: font(12px bold);
|
||||||
|
}
|
||||||
width: -8px;
|
width: -8px;
|
||||||
height: 19px;
|
height: 19px;
|
||||||
textTop: 1px;
|
textTop: 1px;
|
||||||
|
@ -1499,5 +1501,7 @@ pickLocationChooseOnMap: RoundButton(defaultActiveButton) {
|
||||||
height: 44px;
|
height: 44px;
|
||||||
textTop: 11px;
|
textTop: 11px;
|
||||||
width: -96px;
|
width: -96px;
|
||||||
|
style: TextStyle(semiboldTextStyle) {
|
||||||
font: font(15px semibold);
|
font: font(15px semibold);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -1450,17 +1450,17 @@ void EmojiListWidget::drawCollapsedBadge(
|
||||||
int count) {
|
int count) {
|
||||||
const auto &st = st::emojiPanExpand;
|
const auto &st = st::emojiPanExpand;
|
||||||
const auto text = u"+%1"_q.arg(count - _columnCount * kCollapsedRows + 1);
|
const auto text = u"+%1"_q.arg(count - _columnCount * kCollapsedRows + 1);
|
||||||
const auto textWidth = st.font->width(text);
|
const auto textWidth = st.style.font->width(text);
|
||||||
const auto buttonw = std::max(textWidth - st.width, st.height);
|
const auto buttonw = std::max(textWidth - st.width, st.height);
|
||||||
const auto buttonh = st.height;
|
const auto buttonh = st.height;
|
||||||
const auto buttonx = position.x() + (_singleSize.width() - buttonw) / 2;
|
const auto buttonx = position.x() + (_singleSize.width() - buttonw) / 2;
|
||||||
const auto buttony = position.y() + (_singleSize.height() - buttonh) / 2;
|
const auto buttony = position.y() + (_singleSize.height() - buttonh) / 2;
|
||||||
_collapsedBg.paint(p, QRect(buttonx, buttony, buttonw, buttonh));
|
_collapsedBg.paint(p, QRect(buttonx, buttony, buttonw, buttonh));
|
||||||
p.setPen(this->st().bg);
|
p.setPen(this->st().bg);
|
||||||
p.setFont(st.font);
|
p.setFont(st.style.font);
|
||||||
p.drawText(
|
p.drawText(
|
||||||
buttonx + (buttonw - textWidth) / 2,
|
buttonx + (buttonw - textWidth) / 2,
|
||||||
(buttony + st.textTop + st.font->ascent),
|
(buttony + st.textTop + st.style.font->ascent),
|
||||||
text);
|
text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2546,12 +2546,12 @@ int EmojiListWidget::paintButtonGetWidth(
|
||||||
: selected
|
: selected
|
||||||
? st::emojiPanButton.textFgOver
|
? st::emojiPanButton.textFgOver
|
||||||
: st::emojiPanButton.textFg);
|
: st::emojiPanButton.textFg);
|
||||||
p.setFont(st::emojiPanButton.font);
|
p.setFont(st::emojiPanButton.style.font);
|
||||||
p.drawText(
|
p.drawText(
|
||||||
rect.x() - (st::emojiPanButton.width / 2),
|
rect.x() - (st::emojiPanButton.width / 2),
|
||||||
(rect.y()
|
(rect.y()
|
||||||
+ st::emojiPanButton.textTop
|
+ st::emojiPanButton.textTop
|
||||||
+ st::emojiPanButton.font->ascent),
|
+ st::emojiPanButton.style.font->ascent),
|
||||||
button.text);
|
button.text);
|
||||||
return emojiRight() - rect.x();
|
return emojiRight() - rect.x();
|
||||||
}
|
}
|
||||||
|
@ -2678,7 +2678,7 @@ void EmojiListWidget::initButton(
|
||||||
const QString &text,
|
const QString &text,
|
||||||
bool gradient) {
|
bool gradient) {
|
||||||
button.text = text;
|
button.text = text;
|
||||||
button.textWidth = st::emojiPanButton.font->width(text);
|
button.textWidth = st::emojiPanButton.style.font->width(text);
|
||||||
const auto width = button.textWidth - st::emojiPanButton.width;
|
const auto width = button.textWidth - st::emojiPanButton.width;
|
||||||
const auto height = st::emojiPanButton.height;
|
const auto height = st::emojiPanButton.height;
|
||||||
const auto factor = style::DevicePixelRatio();
|
const auto factor = style::DevicePixelRatio();
|
||||||
|
|
|
@ -213,11 +213,14 @@ StickersListWidget::StickersListWidget(
|
||||||
st().pathBg,
|
st().pathBg,
|
||||||
st().pathFg,
|
st().pathFg,
|
||||||
[=] { update(); }))
|
[=] { update(); }))
|
||||||
, _megagroupSetAbout(st::columnMinimalWidthThird - st::emojiScroll.width - st().headerLeft)
|
, _megagroupSetAbout(st::columnMinimalWidthThird
|
||||||
|
- st::emojiScroll.width
|
||||||
|
- st().headerLeft)
|
||||||
, _addText(tr::lng_stickers_featured_add(tr::now))
|
, _addText(tr::lng_stickers_featured_add(tr::now))
|
||||||
, _addWidth(st::stickersTrendingAdd.font->width(_addText))
|
, _addWidth(st::stickersTrendingAdd.style.font->width(_addText))
|
||||||
, _installedText(tr::lng_stickers_featured_installed(tr::now))
|
, _installedText(tr::lng_stickers_featured_installed(tr::now))
|
||||||
, _installedWidth(st::stickersTrendingInstalled.font->width(_installedText))
|
, _installedWidth(
|
||||||
|
st::stickersTrendingInstalled.style.font->width(_installedText))
|
||||||
, _settings(this, tr::lng_stickers_you_have(tr::now))
|
, _settings(this, tr::lng_stickers_you_have(tr::now))
|
||||||
, _previewTimer([=] { showPreview(); })
|
, _previewTimer([=] { showPreview(); })
|
||||||
, _premiumMark(std::make_unique<StickerPremiumMark>(
|
, _premiumMark(std::make_unique<StickerPremiumMark>(
|
||||||
|
@ -974,7 +977,7 @@ void StickersListWidget::paintStickers(Painter &p, QRect clip) {
|
||||||
const auto &st = installedSet
|
const auto &st = installedSet
|
||||||
? st::stickersTrendingInstalled
|
? st::stickersTrendingInstalled
|
||||||
: st::stickersTrendingAdd;
|
: st::stickersTrendingAdd;
|
||||||
p.setFont(st.font);
|
p.setFont(st.style.font);
|
||||||
p.setPen(selected ? st.textFgOver : st.textFg);
|
p.setPen(selected ? st.textFgOver : st.textFg);
|
||||||
p.drawTextLeft(
|
p.drawTextLeft(
|
||||||
add.x() - (st.width / 2),
|
add.x() - (st.width / 2),
|
||||||
|
@ -1238,7 +1241,7 @@ void StickersListWidget::paintMegagroupEmptySet(Painter &p, int y, bool buttonSe
|
||||||
_megagroupSetButtonRipple.reset();
|
_megagroupSetButtonRipple.reset();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
p.setFont(st::stickerGroupCategoryAdd.font);
|
p.setFont(st::stickerGroupCategoryAdd.style.font);
|
||||||
p.setPen(buttonSelected ? st::stickerGroupCategoryAdd.textFgOver : st::stickerGroupCategoryAdd.textFg);
|
p.setPen(buttonSelected ? st::stickerGroupCategoryAdd.textFgOver : st::stickerGroupCategoryAdd.textFg);
|
||||||
p.drawTextLeft(button.x() - (st::stickerGroupCategoryAdd.width / 2), button.y() + st::stickerGroupCategoryAdd.textTop, width(), _megagroupSetButtonText, _megagroupSetButtonTextWidth);
|
p.drawTextLeft(button.x() - (st::stickerGroupCategoryAdd.width / 2), button.y() + st::stickerGroupCategoryAdd.textTop, width(), _megagroupSetButtonText, _megagroupSetButtonTextWidth);
|
||||||
}
|
}
|
||||||
|
@ -2734,7 +2737,7 @@ void StickersListWidget::refreshMegagroupSetGeometry() {
|
||||||
auto left = megagroupSetInfoLeft();
|
auto left = megagroupSetInfoLeft();
|
||||||
auto availableWidth = (width() - left);
|
auto availableWidth = (width() - left);
|
||||||
auto top = _megagroupSetAbout.countHeight(availableWidth) + st::stickerGroupCategoryAddMargin.top();
|
auto top = _megagroupSetAbout.countHeight(availableWidth) + st::stickerGroupCategoryAddMargin.top();
|
||||||
_megagroupSetButtonTextWidth = st::stickerGroupCategoryAdd.font->width(_megagroupSetButtonText);
|
_megagroupSetButtonTextWidth = st::stickerGroupCategoryAdd.style.font->width(_megagroupSetButtonText);
|
||||||
auto buttonWidth = _megagroupSetButtonTextWidth - st::stickerGroupCategoryAdd.width;
|
auto buttonWidth = _megagroupSetButtonTextWidth - st::stickerGroupCategoryAdd.width;
|
||||||
_megagroupSetButtonRect = QRect(left, top, buttonWidth, st::stickerGroupCategoryAdd.height);
|
_megagroupSetButtonRect = QRect(left, top, buttonWidth, st::stickerGroupCategoryAdd.height);
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,15 +70,19 @@ exportCancelButton: RoundButton(attentionBoxButton) {
|
||||||
width: 200px;
|
width: 200px;
|
||||||
height: 44px;
|
height: 44px;
|
||||||
textTop: 12px;
|
textTop: 12px;
|
||||||
|
style: TextStyle(semiboldTextStyle) {
|
||||||
font: font(semibold 15px);
|
font: font(semibold 15px);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
exportCancelBottom: 30px;
|
exportCancelBottom: 30px;
|
||||||
exportDoneButton: RoundButton(defaultActiveButton) {
|
exportDoneButton: RoundButton(defaultActiveButton) {
|
||||||
width: 200px;
|
width: 200px;
|
||||||
height: 44px;
|
height: 44px;
|
||||||
textTop: 12px;
|
textTop: 12px;
|
||||||
|
style: TextStyle(semiboldTextStyle) {
|
||||||
font: font(semibold 15px);
|
font: font(semibold 15px);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
exportAboutLabel: FlatLabel(boxLabel) {
|
exportAboutLabel: FlatLabel(boxLabel) {
|
||||||
textFg: windowSubTextFg;
|
textFg: windowSubTextFg;
|
||||||
|
|
|
@ -362,9 +362,9 @@ void ProgressWidget::showDone() {
|
||||||
tr::lng_export_done(),
|
tr::lng_export_done(),
|
||||||
st::exportDoneButton);
|
st::exportDoneButton);
|
||||||
const auto desired = std::min(
|
const auto desired = std::min(
|
||||||
st::exportDoneButton.font->width(tr::lng_export_done(tr::now))
|
st::exportDoneButton.style.font->width(tr::lng_export_done(tr::now))
|
||||||
+ st::exportDoneButton.height
|
+ st::exportDoneButton.height
|
||||||
- st::exportDoneButton.font->height,
|
- st::exportDoneButton.style.font->height,
|
||||||
st::exportPanelSize.width() - 2 * st::exportCancelBottom);
|
st::exportPanelSize.width() - 2 * st::exportCancelBottom);
|
||||||
if (_done->width() < desired) {
|
if (_done->width() < desired) {
|
||||||
_done->setFullWidth(desired);
|
_done->setFullWidth(desired);
|
||||||
|
|
|
@ -91,7 +91,7 @@ constexpr auto kPremiumToastDuration = 5 * crl::time(1000);
|
||||||
result->paintRequest() | rpl::start_with_next([=] {
|
result->paintRequest() | rpl::start_with_next([=] {
|
||||||
auto p = QPainter(result);
|
auto p = QPainter(result);
|
||||||
|
|
||||||
const auto font = st::historyPremiumViewSet.font;
|
const auto font = st::historyPremiumViewSet.style.font;
|
||||||
const auto top = (result->height() - font->height) / 2;
|
const auto top = (result->height() - font->height) / 2;
|
||||||
auto pen = st::historyPremiumViewSet.textFg->p;
|
auto pen = st::historyPremiumViewSet.textFg->p;
|
||||||
p.setPen(pen);
|
p.setPen(pen);
|
||||||
|
@ -229,7 +229,7 @@ void PaidReactionToast::showFor(
|
||||||
child->show();
|
child->show();
|
||||||
|
|
||||||
const auto leftSkip = skip + size + skip - st.padding.left();
|
const auto leftSkip = skip + size + skip - st.padding.left();
|
||||||
const auto undoFont = st::historyPremiumViewSet.font;
|
const auto undoFont = st::historyPremiumViewSet.style.font;
|
||||||
|
|
||||||
const auto rightSkip = undoFont->width(undoText)
|
const auto rightSkip = undoFont->width(undoText)
|
||||||
+ st::toastUndoSpace
|
+ st::toastUndoSpace
|
||||||
|
|
|
@ -154,7 +154,7 @@ void StickerToast::showWithTitle(const QString &title) {
|
||||||
? tr::lng_animated_emoji_saved_open(tr::now)
|
? tr::lng_animated_emoji_saved_open(tr::now)
|
||||||
: tr::lng_sticker_premium_view(tr::now);
|
: tr::lng_sticker_premium_view(tr::now);
|
||||||
_st.padding.setLeft(skip + size + skip);
|
_st.padding.setLeft(skip + size + skip);
|
||||||
_st.padding.setRight(st::historyPremiumViewSet.font->width(view)
|
_st.padding.setRight(st::historyPremiumViewSet.style.font->width(view)
|
||||||
- st::historyPremiumViewSet.width);
|
- st::historyPremiumViewSet.width);
|
||||||
|
|
||||||
clearHiddenHiding();
|
clearHiddenHiding();
|
||||||
|
|
|
@ -518,7 +518,7 @@ void TranslateBar::showToast(
|
||||||
const QString &buttonText,
|
const QString &buttonText,
|
||||||
Fn<void()> buttonCallback) {
|
Fn<void()> buttonCallback) {
|
||||||
const auto st = std::make_shared<style::Toast>(st::historyPremiumToast);
|
const auto st = std::make_shared<style::Toast>(st::historyPremiumToast);
|
||||||
st->padding.setRight(st::historyPremiumViewSet.font->width(buttonText)
|
st->padding.setRight(st::historyPremiumViewSet.style.font->width(buttonText)
|
||||||
- st::historyPremiumViewSet.width);
|
- st::historyPremiumViewSet.width);
|
||||||
|
|
||||||
const auto weak = Ui::Toast::Show(_wrap.window(), Ui::Toast::Config{
|
const auto weak = Ui::Toast::Show(_wrap.window(), Ui::Toast::Config{
|
||||||
|
|
|
@ -60,9 +60,7 @@ giveawayGiftCodeQuantitySubtitle: FlatLabel(defaultFlatLabel) {
|
||||||
align: align(right);
|
align: align(right);
|
||||||
}
|
}
|
||||||
giveawayGiftCodeQuantityFloat: FlatLabel(defaultFlatLabel) {
|
giveawayGiftCodeQuantityFloat: FlatLabel(defaultFlatLabel) {
|
||||||
style: TextStyle(semiboldTextStyle) {
|
style: semiboldTextStyle;
|
||||||
font: font(13px);
|
|
||||||
}
|
|
||||||
textFg: windowActiveTextFg;
|
textFg: windowActiveTextFg;
|
||||||
minWidth: 50px;
|
minWidth: 50px;
|
||||||
align: align(center);
|
align: align(center);
|
||||||
|
@ -164,7 +162,7 @@ giveawayGiftCodeBox: Box(defaultBox) {
|
||||||
button: RoundButton(defaultActiveButton) {
|
button: RoundButton(defaultActiveButton) {
|
||||||
height: 42px;
|
height: 42px;
|
||||||
textTop: 12px;
|
textTop: 12px;
|
||||||
font: font(13px semibold);
|
style: semiboldTextStyle;
|
||||||
}
|
}
|
||||||
shadowIgnoreTopSkip: true;
|
shadowIgnoreTopSkip: true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,8 +32,7 @@ channelEarnOverviewSubMinorLabel: FlatLabel(channelEarnOverviewMinorLabel) {
|
||||||
}
|
}
|
||||||
channelEarnOverviewSubMinorLabelPos: point(4px, 2px);
|
channelEarnOverviewSubMinorLabelPos: point(4px, 2px);
|
||||||
channelEarnSemiboldLabel: FlatLabel(channelEarnOverviewMajorLabel) {
|
channelEarnSemiboldLabel: FlatLabel(channelEarnOverviewMajorLabel) {
|
||||||
style: TextStyle(semiboldTextStyle) {
|
style: semiboldTextStyle;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
channelEarnHeaderLabel: FlatLabel(channelEarnOverviewMajorLabel) {
|
channelEarnHeaderLabel: FlatLabel(channelEarnOverviewMajorLabel) {
|
||||||
style: TextStyle(statisticsHeaderTitleTextStyle) {
|
style: TextStyle(statisticsHeaderTitleTextStyle) {
|
||||||
|
@ -91,7 +90,7 @@ channelEarnHistoryRecipientButton: RoundButton {
|
||||||
|
|
||||||
iconPosition: point(0px, 0px);
|
iconPosition: point(0px, 0px);
|
||||||
|
|
||||||
font: semiboldFont;
|
style: semiboldTextStyle;
|
||||||
|
|
||||||
ripple: RippleAnimation(defaultRippleAnimation) {
|
ripple: RippleAnimation(defaultRippleAnimation) {
|
||||||
color: windowBgRipple;
|
color: windowBgRipple;
|
||||||
|
|
|
@ -368,7 +368,9 @@ infoProfileCover: InfoProfileCover {
|
||||||
width: -12px;
|
width: -12px;
|
||||||
height: 18px;
|
height: 18px;
|
||||||
textTop: 0px;
|
textTop: 0px;
|
||||||
|
style: TextStyle(defaultTextStyle) {
|
||||||
font: font(12px);
|
font: font(12px);
|
||||||
|
}
|
||||||
ripple: defaultRippleAnimation;
|
ripple: defaultRippleAnimation;
|
||||||
}
|
}
|
||||||
showLastSeenPosition: point(3px, 58px);
|
showLastSeenPosition: point(3px, 58px);
|
||||||
|
@ -607,8 +609,7 @@ infoMembersCancelSearch: CrossButton {
|
||||||
}
|
}
|
||||||
infoMembersSearchTop: 15px;
|
infoMembersSearchTop: 15px;
|
||||||
|
|
||||||
infoMediaHeaderStyle: TextStyle(semiboldTextStyle) {
|
infoMediaHeaderStyle: semiboldTextStyle;
|
||||||
}
|
|
||||||
infoMediaHeaderHeight: 28px;
|
infoMediaHeaderHeight: 28px;
|
||||||
infoMediaHeaderPosition: point(14px, 6px);
|
infoMediaHeaderPosition: point(14px, 6px);
|
||||||
infoMediaSkip: 2px;
|
infoMediaSkip: 2px;
|
||||||
|
@ -1100,7 +1101,7 @@ similarChannelsLockFade: 58px;
|
||||||
similarChannelsLock: RoundButton(defaultActiveButton) {
|
similarChannelsLock: RoundButton(defaultActiveButton) {
|
||||||
height: 44px;
|
height: 44px;
|
||||||
textTop: 12px;
|
textTop: 12px;
|
||||||
font: font(13px semibold);
|
style: semiboldTextStyle;
|
||||||
}
|
}
|
||||||
similarChannelsLockLabel: FlatLabel(defaultFlatLabel) {
|
similarChannelsLockLabel: FlatLabel(defaultFlatLabel) {
|
||||||
textFg: premiumButtonFg;
|
textFg: premiumButtonFg;
|
||||||
|
|
|
@ -81,8 +81,10 @@ introNextButton: RoundButton(defaultActiveButton) {
|
||||||
height: 42px;
|
height: 42px;
|
||||||
radius: 6px;
|
radius: 6px;
|
||||||
textTop: 11px;
|
textTop: 11px;
|
||||||
|
style: TextStyle(semiboldTextStyle) {
|
||||||
font: font(boxFontSize semibold);
|
font: font(boxFontSize semibold);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
introFragmentIcon: icon{{ "fragment", activeButtonFg }};
|
introFragmentIcon: icon{{ "fragment", activeButtonFg }};
|
||||||
introFragmentIconOver: icon{{ "fragment", activeButtonFgOver }};
|
introFragmentIconOver: icon{{ "fragment", activeButtonFgOver }};
|
||||||
introFragmentButton: RoundButton(introNextButton) {
|
introFragmentButton: RoundButton(introNextButton) {
|
||||||
|
|
|
@ -371,12 +371,16 @@ themePreviewLoadingFont: font(16px);
|
||||||
themePreviewLoadingFg: windowSubTextFg;
|
themePreviewLoadingFg: windowSubTextFg;
|
||||||
themePreviewApplyButton: RoundButton(defaultActiveButton) {
|
themePreviewApplyButton: RoundButton(defaultActiveButton) {
|
||||||
height: 38px;
|
height: 38px;
|
||||||
|
style: TextStyle(semiboldTextStyle) {
|
||||||
font: font(15px semibold);
|
font: font(15px semibold);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
themePreviewCancelButton: RoundButton(defaultLightButton) {
|
themePreviewCancelButton: RoundButton(defaultLightButton) {
|
||||||
height: 38px;
|
height: 38px;
|
||||||
|
style: TextStyle(semiboldTextStyle) {
|
||||||
font: font(15px semibold);
|
font: font(15px semibold);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
themePreviewButtonsSkip: 20px;
|
themePreviewButtonsSkip: 20px;
|
||||||
themePreviewDialogsWidth: 312px;
|
themePreviewDialogsWidth: 312px;
|
||||||
|
|
||||||
|
@ -796,7 +800,9 @@ storiesComposeControls: ComposeControls(defaultComposeControls) {
|
||||||
width: -12px;
|
width: -12px;
|
||||||
height: 18px;
|
height: 18px;
|
||||||
textTop: 0px;
|
textTop: 0px;
|
||||||
|
style: TextStyle(defaultTextStyle) {
|
||||||
font: font(12px);
|
font: font(12px);
|
||||||
|
}
|
||||||
ripple: storiesComposeRipple;
|
ripple: storiesComposeRipple;
|
||||||
}
|
}
|
||||||
buttonSkip: 6px;
|
buttonSkip: 6px;
|
||||||
|
@ -959,7 +965,7 @@ storiesStealthBox: Box(defaultBox) {
|
||||||
button: RoundButton(defaultBoxButton) {
|
button: RoundButton(defaultBoxButton) {
|
||||||
height: 42px;
|
height: 42px;
|
||||||
textTop: 12px;
|
textTop: 12px;
|
||||||
font: font(13px semibold);
|
style: semiboldTextStyle;
|
||||||
|
|
||||||
textFg: storiesComposeWhiteText;
|
textFg: storiesComposeWhiteText;
|
||||||
textFgOver: storiesComposeWhiteText;
|
textFgOver: storiesComposeWhiteText;
|
||||||
|
|
|
@ -4917,7 +4917,7 @@ void OverlayWidget::paintThemePreviewContent(
|
||||||
+ (_themeShare->y() - _themePreviewRect.y())
|
+ (_themeShare->y() - _themePreviewRect.y())
|
||||||
+ st::themePreviewCancelButton.padding.top()
|
+ st::themePreviewCancelButton.padding.top()
|
||||||
+ st::themePreviewCancelButton.textTop
|
+ st::themePreviewCancelButton.textTop
|
||||||
+ st::themePreviewCancelButton.font->ascent;
|
+ st::themePreviewCancelButton.style.font->ascent;
|
||||||
p.drawText(
|
p.drawText(
|
||||||
left,
|
left,
|
||||||
baseline,
|
baseline,
|
||||||
|
|
|
@ -49,8 +49,10 @@ passportPasswordSubmit: RoundButton(defaultActiveButton) {
|
||||||
width: 200px;
|
width: 200px;
|
||||||
height: 44px;
|
height: 44px;
|
||||||
textTop: 12px;
|
textTop: 12px;
|
||||||
|
style: TextStyle(semiboldTextStyle) {
|
||||||
font: font(semibold 15px);
|
font: font(semibold 15px);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
passportPasswordSubmitBottom: 72px;
|
passportPasswordSubmitBottom: 72px;
|
||||||
passportPasswordForgotBottom: 36px;
|
passportPasswordForgotBottom: 36px;
|
||||||
|
|
||||||
|
|
|
@ -14,13 +14,17 @@ paymentsPanelSize: size(392px, 600px);
|
||||||
paymentsPanelButton: RoundButton(defaultBoxButton) {
|
paymentsPanelButton: RoundButton(defaultBoxButton) {
|
||||||
width: -36px;
|
width: -36px;
|
||||||
height: 36px;
|
height: 36px;
|
||||||
|
style: TextStyle(defaultTextStyle) {
|
||||||
font: boxButtonFont;
|
font: boxButtonFont;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
paymentsPanelSubmit: RoundButton(defaultActiveButton) {
|
paymentsPanelSubmit: RoundButton(defaultActiveButton) {
|
||||||
width: -36px;
|
width: -36px;
|
||||||
height: 36px;
|
height: 36px;
|
||||||
|
style: TextStyle(defaultTextStyle) {
|
||||||
font: boxButtonFont;
|
font: boxButtonFont;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
paymentsPanelPadding: margins(8px, 12px, 15px, 12px);
|
paymentsPanelPadding: margins(8px, 12px, 15px, 12px);
|
||||||
|
|
||||||
paymentsCoverPadding: margins(26px, 0px, 26px, 13px);
|
paymentsCoverPadding: margins(26px, 0px, 26px, 13px);
|
||||||
|
@ -139,6 +143,8 @@ paymentsLoading: InfiniteRadialAnimation(defaultInfiniteRadialAnimation) {
|
||||||
botWebViewPanelSize: size(384px, 694px);
|
botWebViewPanelSize: size(384px, 694px);
|
||||||
botWebViewBottomButton: RoundButton(paymentsPanelSubmit) {
|
botWebViewBottomButton: RoundButton(paymentsPanelSubmit) {
|
||||||
height: 56px;
|
height: 56px;
|
||||||
|
style: TextStyle(defaultTextStyle) {
|
||||||
font: boxButtonFont;
|
font: boxButtonFont;
|
||||||
|
}
|
||||||
textTop: 19px;
|
textTop: 19px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,7 +61,7 @@ void BackButton::paintEvent(QPaintEvent *e) {
|
||||||
p.fillRect(e->rect(), st::profileBg);
|
p.fillRect(e->rect(), st::profileBg);
|
||||||
st::topBarBack.paint(p, (st::topBarArrowPadding.left() - st::topBarBack.width()) / 2, (st::topBarHeight - st::topBarBack.height()) / 2, width());
|
st::topBarBack.paint(p, (st::topBarArrowPadding.left() - st::topBarBack.width()) / 2, (st::topBarHeight - st::topBarBack.height()) / 2, width());
|
||||||
|
|
||||||
p.setFont(st::topBarButton.font);
|
p.setFont(st::topBarButton.style.font);
|
||||||
p.setPen(st::topBarButton.textFg);
|
p.setPen(st::topBarButton.textFg);
|
||||||
p.drawTextLeft(st::topBarArrowPadding.left(), st::topBarButton.padding.top() + st::topBarButton.textTop, width(), _text);
|
p.drawTextLeft(st::topBarArrowPadding.left(), st::topBarButton.padding.top() + st::topBarButton.textTop, width(), _text);
|
||||||
}
|
}
|
||||||
|
|
|
@ -531,7 +531,7 @@ filterInviteBox: Box(defaultBox) {
|
||||||
button: RoundButton(defaultActiveButton) {
|
button: RoundButton(defaultActiveButton) {
|
||||||
height: 42px;
|
height: 42px;
|
||||||
textTop: 12px;
|
textTop: 12px;
|
||||||
font: font(13px semibold);
|
style: semiboldTextStyle;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
filterInviteButtonStyle: TextStyle(defaultTextStyle) {
|
filterInviteButtonStyle: TextStyle(defaultTextStyle) {
|
||||||
|
|
|
@ -1429,7 +1429,7 @@ not_null<Ui::RoundButton*> CreateLockedButton(
|
||||||
|
|
||||||
const auto labelSt = result->lifetime().make_state<style::FlatLabel>(
|
const auto labelSt = result->lifetime().make_state<style::FlatLabel>(
|
||||||
st::defaultFlatLabel);
|
st::defaultFlatLabel);
|
||||||
labelSt->style.font = st.font;
|
labelSt->style.font = st.style.font;
|
||||||
labelSt->textFg = st.textFg;
|
labelSt->textFg = st.textFg;
|
||||||
|
|
||||||
const auto label = Ui::CreateChild<Ui::FlatLabel>(
|
const auto label = Ui::CreateChild<Ui::FlatLabel>(
|
||||||
|
|
|
@ -68,8 +68,10 @@ statisticsHeaderButton: RoundButton(defaultLightButton) {
|
||||||
width: -14px;
|
width: -14px;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
textTop: 2px;
|
textTop: 2px;
|
||||||
|
style: TextStyle(semiboldTextStyle) {
|
||||||
font: font(11px semibold);
|
font: font(11px semibold);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
statisticsLoadingSubtext: FlatLabel(changePhoneDescription) {
|
statisticsLoadingSubtext: FlatLabel(changePhoneDescription) {
|
||||||
minWidth: 256px;
|
minWidth: 256px;
|
||||||
|
|
|
@ -276,7 +276,7 @@ void Panel::Button::paintEvent(QPaintEvent *e) {
|
||||||
paintRipple(p, rect().topLeft(), &ripple);
|
paintRipple(p, rect().topLeft(), &ripple);
|
||||||
}
|
}
|
||||||
|
|
||||||
p.setFont(_st.font);
|
p.setFont(_st.style.font);
|
||||||
|
|
||||||
const auto height = rect().height();
|
const auto height = rect().height();
|
||||||
const auto progress = st::paymentsLoading.size;
|
const auto progress = st::paymentsLoading.size;
|
||||||
|
|
|
@ -396,7 +396,7 @@ object_ptr<RoundButton> FilterLinkProcessButton(
|
||||||
const auto label = result->lifetime().make_state<Label>(result.data());
|
const auto label = result->lifetime().make_state<Label>(result.data());
|
||||||
label->setAttribute(Qt::WA_TransparentForMouseEvents);
|
label->setAttribute(Qt::WA_TransparentForMouseEvents);
|
||||||
result->sizeValue() | rpl::start_with_next([=](QSize size) {
|
result->sizeValue() | rpl::start_with_next([=](QSize size) {
|
||||||
const auto xskip = st->font->spacew;
|
const auto xskip = st->style.font->spacew;
|
||||||
const auto yskip = xskip / 2;
|
const auto yskip = xskip / 2;
|
||||||
label->setGeometry(QRect(QPoint(), size).marginsRemoved(
|
label->setGeometry(QRect(QPoint(), size).marginsRemoved(
|
||||||
{ xskip, yskip, xskip, yskip }));
|
{ xskip, yskip, xskip, yskip }));
|
||||||
|
|
|
@ -97,7 +97,7 @@ premiumPreviewBox: Box(defaultBox) {
|
||||||
button: RoundButton(defaultActiveButton) {
|
button: RoundButton(defaultActiveButton) {
|
||||||
height: 44px;
|
height: 44px;
|
||||||
textTop: 12px;
|
textTop: 12px;
|
||||||
font: font(13px semibold);
|
style: semiboldTextStyle;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
premiumPreviewDoubledLimitsBox: Box(premiumPreviewBox) {
|
premiumPreviewDoubledLimitsBox: Box(premiumPreviewBox) {
|
||||||
|
@ -295,7 +295,7 @@ boostBox: Box(premiumPreviewDoubledLimitsBox) {
|
||||||
button: RoundButton(defaultActiveButton) {
|
button: RoundButton(defaultActiveButton) {
|
||||||
height: 42px;
|
height: 42px;
|
||||||
textTop: 12px;
|
textTop: 12px;
|
||||||
font: font(13px semibold);
|
style: semiboldTextStyle;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -323,7 +323,7 @@ showOrShowButton: RoundButton(defaultActiveButton) {
|
||||||
width: 308px;
|
width: 308px;
|
||||||
height: 42px;
|
height: 42px;
|
||||||
textTop: 12px;
|
textTop: 12px;
|
||||||
font: font(13px semibold);
|
style: semiboldTextStyle;
|
||||||
}
|
}
|
||||||
showOrLabel: FlatLabel(boostText) {
|
showOrLabel: FlatLabel(boostText) {
|
||||||
textFg: windowSubTextFg;
|
textFg: windowSubTextFg;
|
||||||
|
@ -372,7 +372,7 @@ paidReactBox: Box(boostBox) {
|
||||||
button: RoundButton(defaultActiveButton) {
|
button: RoundButton(defaultActiveButton) {
|
||||||
height: 42px;
|
height: 42px;
|
||||||
textTop: 12px;
|
textTop: 12px;
|
||||||
font: font(13px semibold);
|
style: semiboldTextStyle;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
paidReactBubbleIcon: icon{{ "settings/premium/star", premiumButtonFg }};
|
paidReactBubbleIcon: icon{{ "settings/premium/star", premiumButtonFg }};
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit a30e22d268827449d31d7342e63967392686844e
|
Subproject commit 60cf1cad7a3ea742972037fe6c7e058a1cedf17e
|
Loading…
Add table
Reference in a new issue