2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Allow showing boxes in passport panel.

This commit is contained in:
John Preston
2018-04-06 20:23:09 +04:00
parent f1519b76f6
commit d0e854e9d8
32 changed files with 293 additions and 236 deletions

View File

@@ -23,14 +23,8 @@ class FlatLabel;
class FadeShadow;
} // namespace Ui
namespace Window {
class Controller;
} // namespace Window
class BoxContentDelegate {
public:
virtual Window::Controller *controller() const = 0;
virtual void setLayerType(bool layerType) = 0;
virtual void setTitle(base::lambda<TextWithEntities()> titleFactory) = 0;
virtual void setAdditionalTitle(base::lambda<QString()> additionalFactory) = 0;
@@ -108,10 +102,6 @@ public:
finishPrepare();
}
Window::Controller *controller() {
return getDelegate()->controller();
}
public slots:
void onScrollToY(int top, int bottom = -1);
@@ -215,11 +205,8 @@ class AbstractBox
, public BoxContentDelegate
, protected base::Subscriber {
public:
AbstractBox(QWidget *parent, Window::Controller *controller, object_ptr<BoxContent> content);
AbstractBox(QWidget *parent, object_ptr<BoxContent> content);
Window::Controller *controller() const override {
return _controller;
}
void parentResized() override;
void setLayerType(bool layerType) override;
@@ -275,7 +262,6 @@ private:
int countRealHeight() const;
void updateSize();
Window::Controller *_controller = nullptr;
int _fullHeight = 0;
bool _noContentMargin = false;