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

Added floating button in dialog list to jump to top.

This commit is contained in:
23rd
2019-04-05 11:28:07 +03:00
committed by John Preston
parent 6021923bf1
commit 41b2e7c9c7
4 changed files with 108 additions and 26 deletions

View File

@@ -11,6 +11,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ui/effects/animations.h"
#include "ui/widgets/scroll_area.h"
#include "dialogs/dialogs_key.h"
#include "ui/special_buttons.h"
class DialogsInner;
@@ -64,7 +65,7 @@ public:
void repaintDialogRow(Dialogs::Mode list, not_null<Dialogs::Row*> row);
void repaintDialogRow(Dialogs::RowDescriptor row);
void dialogsToUp();
void jumpToTop();
void startWidthAnimation();
void stopWidthAnimation();
@@ -205,6 +206,16 @@ private:
Window::SlideDirection _showDirection;
QPixmap _cacheUnder, _cacheOver;
Ui::Animations::Simple _scrollToTopShown;
bool _scrollToTopIsShown = false;
object_ptr<Ui::HistoryDownButton> _scrollToTop;
void scrollToTop();
void setupScrollUpButton();
void updateScrollUpVisibility();
void startScrollUpButtonAnimation(bool shown);
void updateScrollUpPosition();
Dialogs::Key _searchInChat;
History *_searchInMigrated = nullptr;
UserData *_searchFromUser = nullptr;