Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
rustdesk
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李朝发
rustdesk
Commits
df5a2ab5
Commit
df5a2ab5
authored
Sep 19, 2022
by
Kingtous
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
opt: custom scroll for better scroll and add trackpad support
parent
e1ab01a9
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
5 deletions
+16
-5
consts.dart
flutter/lib/consts.dart
+3
-1
connection_page.dart
flutter/lib/desktop/pages/connection_page.dart
+3
-1
peer_widget.dart
flutter/lib/desktop/widgets/peer_widget.dart
+1
-1
scroll_wrapper.dart
flutter/lib/desktop/widgets/scroll_wrapper.dart
+5
-1
pubspec.yaml
flutter/pubspec.yaml
+4
-1
No files found.
flutter/lib/consts.dart
View file @
df5a2ab5
...
@@ -16,7 +16,9 @@ const int kDesktopDefaultDisplayWidth = 1080;
...
@@ -16,7 +16,9 @@ const int kDesktopDefaultDisplayWidth = 1080;
const
int
kDesktopDefaultDisplayHeight
=
720
;
const
int
kDesktopDefaultDisplayHeight
=
720
;
/// [kDefaultScrollAmountMultiplier] indicates how many rows can be scrolled after a minimum scroll action of mouse
/// [kDefaultScrollAmountMultiplier] indicates how many rows can be scrolled after a minimum scroll action of mouse
const
kDefaultScrollAmountMultiplier
=
10.0
;
const
kDefaultScrollAmountMultiplier
=
5.0
;
const
kDefaultScrollDuration
=
Duration
(
milliseconds:
50
);
const
kDefaultMouseWhellThrottleDuration
=
Duration
(
milliseconds:
50
);
const
kFullScreenEdgeSize
=
1.0
;
const
kFullScreenEdgeSize
=
1.0
;
const
kWindowEdgeSize
=
4.0
;
const
kWindowEdgeSize
=
4.0
;
...
...
flutter/lib/desktop/pages/connection_page.dart
View file @
df5a2ab5
...
@@ -852,7 +852,9 @@ class _PeerTabbedPageState extends State<_PeerTabbedPage>
...
@@ -852,7 +852,9 @@ class _PeerTabbedPageState extends State<_PeerTabbedPage>
Widget
_createTabBarView
()
{
Widget
_createTabBarView
()
{
return
Expanded
(
return
Expanded
(
child:
PageView
(
child:
PageView
(
controller:
_pageController
,
children:
super
.
widget
.
children
)
physics:
NeverScrollableScrollPhysics
(),
controller:
_pageController
,
children:
super
.
widget
.
children
)
.
marginSymmetric
(
vertical:
12
));
.
marginSymmetric
(
vertical:
12
));
}
}
...
...
flutter/lib/desktop/widgets/peer_widget.dart
View file @
df5a2ab5
...
@@ -89,7 +89,7 @@ class _PeerWidgetState extends State<_PeerWidget> with WindowListener {
...
@@ -89,7 +89,7 @@ class _PeerWidgetState extends State<_PeerWidget> with WindowListener {
:
DesktopScrollWrapper
(
:
DesktopScrollWrapper
(
scrollController:
_scrollController
,
scrollController:
_scrollController
,
child:
SingleChildScrollView
(
child:
SingleChildScrollView
(
physics:
const
NeverScrollableScrollPhysics
(),
physics:
NeverScrollableScrollPhysics
(),
controller:
_scrollController
,
controller:
_scrollController
,
child:
ObxValue
<
RxString
>((
searchText
)
{
child:
ObxValue
<
RxString
>((
searchText
)
{
return
FutureBuilder
<
List
<
Peer
>>(
return
FutureBuilder
<
List
<
Peer
>>(
...
...
flutter/lib/desktop/widgets/scroll_wrapper.dart
View file @
df5a2ab5
...
@@ -14,7 +14,11 @@ class DesktopScrollWrapper extends StatelessWidget {
...
@@ -14,7 +14,11 @@ class DesktopScrollWrapper extends StatelessWidget {
return
ImprovedScrolling
(
return
ImprovedScrolling
(
scrollController:
scrollController
,
scrollController:
scrollController
,
enableCustomMouseWheelScrolling:
true
,
enableCustomMouseWheelScrolling:
true
,
customMouseWheelScrollConfig:
const
CustomMouseWheelScrollConfig
(
customMouseWheelScrollConfig:
CustomMouseWheelScrollConfig
(
scrollDuration:
kDefaultScrollDuration
,
scrollCurve:
Curves
.
linearToEaseOut
,
mouseWheelTurnsThrottleTimeMs:
kDefaultMouseWhellThrottleDuration
.
inMilliseconds
,
scrollAmountMultiplier:
kDefaultScrollAmountMultiplier
),
scrollAmountMultiplier:
kDefaultScrollAmountMultiplier
),
child:
child
,
child:
child
,
);
);
...
...
flutter/pubspec.yaml
View file @
df5a2ab5
...
@@ -80,7 +80,10 @@ dependencies:
...
@@ -80,7 +80,10 @@ dependencies:
desktop_drop
:
^0.3.3
desktop_drop
:
^0.3.3
scroll_pos
:
^0.3.0
scroll_pos
:
^0.3.0
rxdart
:
^0.27.5
rxdart
:
^0.27.5
flutter_improved_scrolling
:
^0.0.3
flutter_improved_scrolling
:
git
:
url
:
https://github.com/Kingtous/flutter_improved_scrolling
ref
:
62f09545149f320616467c306c8c5f71714a18e6
dev_dependencies
:
dev_dependencies
:
icons_launcher
:
^2.0.4
icons_launcher
:
^2.0.4
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment