mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
Fix build on Linux.
This commit is contained in:
@@ -328,19 +328,19 @@ void QrWidget::setupControls() {
|
||||
contentTop() + st::introQrStepsTop);
|
||||
}, steps->lifetime());
|
||||
|
||||
const auto skip = Ui::CreateChild<Ui::LinkButton>(
|
||||
_skip = Ui::CreateChild<Ui::LinkButton>(
|
||||
this,
|
||||
tr::lng_intro_qr_skip(tr::now));
|
||||
rpl::combine(
|
||||
sizeValue(),
|
||||
skip->widthValue()
|
||||
_skip->widthValue()
|
||||
) | rpl::start_with_next([=](QSize size, int skipWidth) {
|
||||
skip->moveToLeft(
|
||||
_skip->moveToLeft(
|
||||
(size.width() - skipWidth) / 2,
|
||||
contentTop() + st::introQrSkipTop);
|
||||
}, skip->lifetime());
|
||||
}, _skip->lifetime());
|
||||
|
||||
skip->setClickedCallback([=] { submit(); });
|
||||
_skip->setClickedCallback([=] { submit(); });
|
||||
}
|
||||
|
||||
void QrWidget::refreshCode() {
|
||||
@@ -441,8 +441,8 @@ void QrWidget::activate() {
|
||||
Step::activate();
|
||||
showChildren();
|
||||
|
||||
if (const auto skipButton = findChild<Ui::LinkButton*>()) {
|
||||
skipButton->setFocus(Qt::OtherFocusReason);
|
||||
if (_skip) {
|
||||
_skip->setFocus(Qt::OtherFocusReason);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -11,6 +11,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "intro/intro_step.h"
|
||||
#include "base/timer.h"
|
||||
|
||||
namespace Ui {
|
||||
class LinkButton;
|
||||
} // namespace Ui
|
||||
|
||||
namespace Intro {
|
||||
namespace details {
|
||||
|
||||
@@ -52,6 +56,7 @@ private:
|
||||
void done(const MTPauth_Authorization &authorization);
|
||||
|
||||
rpl::event_stream<QByteArray> _qrCodes;
|
||||
Ui::LinkButton *_skip = nullptr;
|
||||
base::Timer _refreshTimer;
|
||||
mtpRequestId _requestId = 0;
|
||||
bool _forceRefresh = false;
|
||||
|
||||
Reference in New Issue
Block a user