From ba40979470132db759fe8b8e7ff8ca70845f92c1 Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Mon, 14 Mar 2022 18:24:52 +0300 Subject: [PATCH] Moved out kMaxScrollSpeed from scroll area. --- ui/dragging_scroll_manager.cpp | 7 ++++++- ui/widgets/scroll_area.h | 3 --- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ui/dragging_scroll_manager.cpp b/ui/dragging_scroll_manager.cpp index 29aecdf..e9f2f2d 100644 --- a/ui/dragging_scroll_manager.cpp +++ b/ui/dragging_scroll_manager.cpp @@ -8,9 +8,14 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "ui/dragging_scroll_manager.h" #include "base/timer.h" -#include "ui/widgets/scroll_area.h" // kMaxScrollSpeed. namespace Ui { +namespace { + +// 37px per 15ms while select-by-drag. +inline constexpr auto kMaxScrollSpeed = 37; + +} // namespace DraggingScrollManager::DraggingScrollManager() = default; diff --git a/ui/widgets/scroll_area.h b/ui/widgets/scroll_area.h index 3ab7db1..03692a6 100644 --- a/ui/widgets/scroll_area.h +++ b/ui/widgets/scroll_area.h @@ -17,9 +17,6 @@ namespace Ui { -// 37px per 15ms while select-by-drag. -inline constexpr auto kMaxScrollSpeed = 37; - // Touch flick ignore 3px. inline constexpr auto kFingerAccuracyThreshold = 3;