mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
Support box->setTitle(v::text::data, context).
This commit is contained in:
@@ -63,7 +63,7 @@ rpl::producer<TextWithEntities> Text3() {
|
||||
} // namespace
|
||||
|
||||
void AboutBox(not_null<Ui::GenericBox*> box) {
|
||||
box->setTitle(rpl::single(u"Telegram Desktop"_q));
|
||||
box->setTitle(u"Telegram Desktop"_q);
|
||||
|
||||
auto layout = box->verticalLayout();
|
||||
|
||||
|
||||
@@ -105,11 +105,9 @@ void ShowReportMessageBox(
|
||||
}
|
||||
if (!result.options.empty() || result.commentOption) {
|
||||
show->show(Box([=](not_null<Ui::GenericBox*> box) {
|
||||
box->setTitle(
|
||||
rpl::single(
|
||||
result.title.isEmpty()
|
||||
? reportInput.optionText
|
||||
: result.title));
|
||||
box->setTitle(result.title.isEmpty()
|
||||
? reportInput.optionText
|
||||
: result.title);
|
||||
|
||||
for (const auto &option : result.options) {
|
||||
const auto button = Ui::AddReportOptionButton(
|
||||
|
||||
@@ -149,7 +149,7 @@ DebugInfoBox::DebugInfoBox(QWidget*, base::weak_ptr<Call> call)
|
||||
}
|
||||
|
||||
void DebugInfoBox::prepare() {
|
||||
setTitle(rpl::single(u"Call Debug"_q));
|
||||
setTitle(u"Call Debug"_q);
|
||||
|
||||
addButton(tr::lng_close(), [this] { closeBox(); });
|
||||
_text = setInnerWidget(
|
||||
|
||||
@@ -372,7 +372,7 @@ void EditWebPageOptions(
|
||||
Data::WebPageDraft draft,
|
||||
Fn<void(Data::WebPageDraft)> done) {
|
||||
show->show(Box([=](not_null<Ui::GenericBox*> box) {
|
||||
box->setTitle(rpl::single(u"Link Preview"_q));
|
||||
box->setTitle(u"Link Preview"_q);
|
||||
|
||||
struct State {
|
||||
rpl::variable<Data::WebPageDraft> result;
|
||||
|
||||
@@ -318,7 +318,7 @@ void ShowReportSponsoredBox(
|
||||
}
|
||||
if (!result.options.empty()) {
|
||||
show->show(Box([=](not_null<Ui::GenericBox*> box) {
|
||||
box->setTitle(rpl::single(result.title));
|
||||
box->setTitle(result.title);
|
||||
|
||||
for (const auto &option : result.options) {
|
||||
const auto button = Ui::AddReportOptionButton(
|
||||
|
||||
@@ -495,7 +495,7 @@ ConfirmContactBox::ConfirmContactBox(
|
||||
}
|
||||
|
||||
void ConfirmContactBox::prepare() {
|
||||
setTitle(rpl::single(u"Confirmation"_q)); // #TODO hard_lang
|
||||
setTitle(u"Confirmation"_q); // #TODO hard_lang
|
||||
|
||||
auto maxWidth = 0;
|
||||
if (_comment) {
|
||||
|
||||
@@ -102,7 +102,7 @@ EditInfoBox::EditInfoBox(
|
||||
}
|
||||
|
||||
void EditInfoBox::prepare() {
|
||||
setTitle(rpl::single(u"Edit support information"_q)); // #TODO hard_lang
|
||||
setTitle(u"Edit support information"_q); // #TODO hard_lang
|
||||
|
||||
const auto save = [=] {
|
||||
const auto done = crl::guard(this, [=](bool success) {
|
||||
|
||||
@@ -485,7 +485,7 @@ void BoostBox(
|
||||
+ QMargins(0, st::boostTextSkip, 0, st::boostBottomSkip)));
|
||||
|
||||
const auto current = state->data.current();
|
||||
box->setTitle(rpl::single(QString()));
|
||||
box->setTitle(QString());
|
||||
AddFeaturesList(
|
||||
box->verticalLayout(),
|
||||
data.features,
|
||||
|
||||
@@ -346,7 +346,7 @@ void EditorBlock::activateRow(const Row &row) {
|
||||
});
|
||||
box->addButton(tr::lng_settings_save(), save);
|
||||
box->addButton(tr::lng_cancel(), [=] { box->closeBox(); });
|
||||
box->setTitle(rpl::single(name));
|
||||
box->setTitle(name);
|
||||
box->setWidth(editor->width());
|
||||
|
||||
_context->colorEditor.box = box;
|
||||
|
||||
+1
-1
Submodule Telegram/lib_ui updated: b308637783...5977759c8a
Reference in New Issue
Block a user