mirror of
https://github.com/vale981/tdesktop
synced 2025-03-06 02:01:40 -05:00
Intro cover now shows palette changes in realtime.
This commit is contained in:
parent
8ffdfa7923
commit
f2e69d2621
4 changed files with 12 additions and 3 deletions
|
@ -32,7 +32,7 @@ class FlatLabel;
|
|||
|
||||
namespace Intro {
|
||||
|
||||
class PhoneWidget : public Widget::Step, private base::Subscriber {
|
||||
class PhoneWidget : public Widget::Step {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
|
|
@ -31,7 +31,7 @@ class NewAvatarButton;
|
|||
|
||||
namespace Intro {
|
||||
|
||||
class SignupWidget : public Widget::Step, private base::Subscriber {
|
||||
class SignupWidget : public Widget::Step {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
|
|
@ -43,6 +43,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
|
|||
#include "styles/style_boxes.h"
|
||||
#include "styles/style_intro.h"
|
||||
#include "styles/style_window.h"
|
||||
#include "window/themes/window_theme.h"
|
||||
|
||||
namespace Intro {
|
||||
|
||||
|
@ -663,6 +664,14 @@ Widget::Step::Step(QWidget *parent, Data *data, bool hasCover) : TWidget(parent)
|
|||
, _title(this, _hasCover ? st::introCoverTitle : st::introTitle)
|
||||
, _description(this, object_ptr<Ui::FlatLabel>(this, _hasCover ? st::introCoverDescription : st::introDescription), st::introErrorDuration) {
|
||||
hide();
|
||||
subscribe(Window::Theme::Background(), [this](const Window::Theme::BackgroundUpdate &update) {
|
||||
if (update.paletteChanged()) {
|
||||
if (!_coverMask.isNull()) {
|
||||
_coverMask = QPixmap();
|
||||
prepareCoverMask();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void Widget::Step::prepareShowAnimated(Step *after) {
|
||||
|
|
|
@ -92,7 +92,7 @@ public:
|
|||
Forward,
|
||||
Replace,
|
||||
};
|
||||
class Step : public TWidget, public RPCSender {
|
||||
class Step : public TWidget, public RPCSender, protected base::Subscriber {
|
||||
public:
|
||||
Step(QWidget *parent, Data *data, bool hasCover = false);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue