2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Allow to resize chats list. One more mode added (narrow chats list).

This commit is contained in:
John Preston
2017-01-14 21:50:16 +03:00
parent 983db3a682
commit 4424dbf64a
33 changed files with 558 additions and 140 deletions

View File

@@ -30,6 +30,10 @@ class SectionMemento;
struct SectionSlideParams {
QPixmap oldContentCache;
bool withTopBarShadow = false;
explicit operator bool() const {
return !oldContentCache.isNull();
}
};
class SectionWidget : public TWidget, protected base::Subscriber {
@@ -52,6 +56,7 @@ public:
return false;
}
void showAnimated(SlideDirection direction, const SectionSlideParams &params);
void showFast();
// This can be used to grab with or without top bar shadow.
// This will be protected when animation preparation will be done inside.
@@ -67,8 +72,8 @@ public:
// Create a memento of that section to store it in the history stack.
virtual std_::unique_ptr<SectionMemento> createMemento() const = 0;
virtual void setInnerFocus() {
setFocus();
void setInnerFocus() {
doSetInnerFocus();
}
protected:
@@ -88,6 +93,10 @@ protected:
virtual void showFinishedHook() {
}
virtual void doSetInnerFocus() {
setFocus();
}
private:
void showFinished();