Moved out kMaxScrollSpeed from scroll area.
This commit is contained in:
parent
2779a7d036
commit
ba40979470
2 changed files with 6 additions and 4 deletions
|
|
@ -8,9 +8,14 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "ui/dragging_scroll_manager.h"
|
#include "ui/dragging_scroll_manager.h"
|
||||||
|
|
||||||
#include "base/timer.h"
|
#include "base/timer.h"
|
||||||
#include "ui/widgets/scroll_area.h" // kMaxScrollSpeed.
|
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
|
namespace {
|
||||||
|
|
||||||
|
// 37px per 15ms while select-by-drag.
|
||||||
|
inline constexpr auto kMaxScrollSpeed = 37;
|
||||||
|
|
||||||
|
} // namespace
|
||||||
|
|
||||||
DraggingScrollManager::DraggingScrollManager() = default;
|
DraggingScrollManager::DraggingScrollManager() = default;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,9 +17,6 @@
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
|
|
||||||
// 37px per 15ms while select-by-drag.
|
|
||||||
inline constexpr auto kMaxScrollSpeed = 37;
|
|
||||||
|
|
||||||
// Touch flick ignore 3px.
|
// Touch flick ignore 3px.
|
||||||
inline constexpr auto kFingerAccuracyThreshold = 3;
|
inline constexpr auto kFingerAccuracyThreshold = 3;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue