tdesktop/Telegram/SourceFiles/settings/settings_intro.h

56 lines
1.1 KiB
C
Raw Normal View History

2018-09-11 18:07:04 +00:00
/*
This file is part of Telegram Desktop,
the official desktop application for the Telegram messaging service.
For license and copyright information please follow this link:
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#pragma once
2019-09-18 11:19:05 +00:00
#include "ui/layers/layer_widget.h"
2018-09-11 18:07:04 +00:00
namespace Ui {
class VerticalLayout;
class FadeShadow;
class FlatLabel;
template <typename Widget>
class FadeWrap;
} // namespace Ui
2020-06-10 14:52:44 +00:00
namespace Window {
class Controller;
} // namespace Window
2018-09-11 18:07:04 +00:00
namespace Settings {
class IntroWidget;
2019-09-18 11:19:05 +00:00
class LayerWidget : public Ui::LayerWidget {
2018-09-11 18:07:04 +00:00
public:
2020-06-10 14:52:44 +00:00
LayerWidget(QWidget*, not_null<Window::Controller*> window);
2018-09-11 18:07:04 +00:00
void showFinished() override;
void parentResized() override;
static int MinimalSupportedWidth();
protected:
int resizeGetHeight(int newWidth) override;
void doSetInnerFocus() override;
void paintEvent(QPaintEvent *e) override;
private:
void setupHeightConsumers();
object_ptr<IntroWidget> _content;
int _desiredHeight = 0;
bool _inResize = false;
bool _tillTop = false;
bool _tillBottom = false;
};
} // namespace Settings