Merge tag 'v6.1.3' into dev

This commit is contained in:
AlexeyZavar
2025-10-04 17:24:42 +03:00
598 changed files with 20578 additions and 6423 deletions
+15 -7
View File
@@ -912,10 +912,12 @@ void Controller::showWebviewError() {
}
void Controller::showWebviewError(TextWithEntities text) {
auto error = Ui::CreateChild<Ui::PaddingWrap<Ui::FlatLabel>>(
_container,
const auto wrap = Ui::CreateChild<Ui::RpWidget>(_container);
const auto error = Ui::CreateChild<Ui::PaddingWrap<Ui::FlatLabel>>(
wrap,
object_ptr<Ui::FlatLabel>(
_container,
wrap,
rpl::single(text),
st::paymentsCriticalError),
st::paymentsCriticalErrorPadding);
@@ -929,10 +931,16 @@ void Controller::showWebviewError(TextWithEntities text) {
File::OpenUrl(entity.data);
return false;
});
error->show();
wrap->show();
wrap->widthValue() | rpl::start_with_next([=](int width) {
error->resizeToWidth(width);
wrap->resize(width, error->height());
}, wrap->lifetime());
_container->sizeValue() | rpl::start_with_next([=](QSize size) {
error->setGeometry(0, 0, size.width(), size.height() * 2 / 3);
}, error->lifetime());
wrap->setGeometry(0, 0, size.width(), size.height() * 2 / 3);
}, wrap->lifetime());
}
void Controller::showInWindow(
@@ -1105,7 +1113,7 @@ void Controller::showMenu() {
}
_menu->setDestroyedCallback(crl::guard(_window.get(), [
this,
weakButton = Ui::MakeWeak(_menuToggle.data()),
weakButton = base::make_weak(_menuToggle.data()),
menu = _menu.get()] {
if (_menu == menu && weakButton) {
weakButton->setForceRippled(false);
+2 -2
View File
@@ -315,11 +315,11 @@ ShareBoxResult Shown::shareBox(ShareBoxDescriptor &&descriptor) {
};
const auto state = wrap->lifetime().make_state<State>();
const auto weak = QPointer<Ui::RpWidget>(wrap);
const auto weak = base::make_weak(wrap);
const auto lookup = crl::guard(weak, [state] { return state->stack; });
const auto layer = Ui::CreateChild<Ui::LayerStackWidget>(
wrap.get(),
[=] { return std::make_shared<Show>(weak.data(), lookup); });
[=] { return std::make_shared<Show>(weak.get(), lookup); });
state->stack = layer;
const auto show = layer->showFactory()();
+1 -1
View File
@@ -22,9 +22,9 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "base/flat_map.h"
#include "base/flat_set.h"
#include "base/weak_qptr.h"
#include "ui/qt_object_factory.h"
#include "ui/qt_weak_factory.h"
#include "scheme.h"
#include "logs.h"