Restyle the send-without-formatting box

This commit is contained in:
John Preston
2026-07-01 12:55:47 +04:00
parent 90707a9f6c
commit bd4a6b4fe3
2 changed files with 10 additions and 3 deletions
@@ -4046,7 +4046,8 @@ void OfferRichMessagePremiumChoice(
return;
}
show->showBox(Box([=](not_null<Ui::GenericBox*> box) {
box->setWidth(st::boxWideWidth);
box->setWidth(st::boxWidth);
box->setStyle(st::ivEditorPremiumChoiceBox);
const auto icon = box->addRow(
object_ptr<Ui::RpWidget>(box),
@@ -4098,7 +4099,7 @@ void OfferRichMessagePremiumChoice(
object_ptr<Ui::RoundButton>(
box,
tr::lng_posts_subscribe(),
st::defaultLightButton),
st::defaultActiveButton),
st::boxRowPadding,
style::al_justify);
subscribe->setClickedCallback([=] {
@@ -4130,6 +4131,9 @@ void OfferRichMessagePremiumChoice(
cancel->setClickedCallback([=] {
box->closeBox();
});
for (const auto &button : { subscribe, plain, cancel }) {
button->setFullRadius(true);
}
Ui::AddSkip(box->verticalLayout());
}));
}
+4 -1
View File
@@ -96,6 +96,9 @@ ivEditorSendLockBadgePosition: point(-3px, -3px);
ivComposeSendLockBadgePosition: point(1px, 2px);
ivEditorSendLockBadgePadding: 3px;
ivEditorPremiumChoiceAboutSkip: 10px;
ivEditorPremiumChoiceBox: Box(defaultBox) {
buttonHeight: 0px;
}
ivEditorSendLockIcon: icon{{ "chat/mini_lock", windowFgActive }};
ivEditorToolbarPremiumStarSize: 11px;
ivEditorToolbarPremiumStarSkip: point(5px, 5px);
@@ -126,7 +129,7 @@ ivEditorToolbarPlainTextIcon: icon {{ "menu/rich/plain_text-24x24", menuIconColo
ivEditorToolbarLinkIcon: icon {{ "menu/rich/link-24x24", menuIconColor }};
ivEditorBottomDiscardIcon: icon {{ "menu/rich/discard-24x24", menuIconColor }};
ivEditorBottomCancelIcon: icon {{ "menu/rich/cancel-24x24", menuIconColor }};
ivEditorPremiumChoiceIcon: icon {{ "menu/rich/plain_text-24x24", windowFgActive }};
ivEditorPremiumChoiceIcon: icon {{ "menu/article_rich-24x24", windowFgActive }};
ivEditorPremiumChoiceIconCircle: 64px;
ivEditorPremiumChoiceIconPadding: margins(0px, 8px, 0px, 12px);
ivEditorToolbarButton: IconButton(defaultIconButton) {