flutter_desktop: fix scroll to center when mouse hover menu bar

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou
2022-09-12 01:35:56 -07:00
parent 5926892734
commit c479e0871d
3 changed files with 59 additions and 57 deletions

View File

@@ -612,12 +612,12 @@ class ImagePaint extends StatelessWidget {
cursorOverImage.value ? const NeverScrollableScrollPhysics() : null;
return Scrollbar(
controller: _vertical,
thumbVisibility: true,
trackVisibility: true,
thumbVisibility: false,
trackVisibility: false,
child: Scrollbar(
controller: _horizontal,
thumbVisibility: true,
trackVisibility: true,
thumbVisibility: false,
trackVisibility: false,
notificationPredicate: (notif) => notif.depth == 1,
child: SingleChildScrollView(
controller: _vertical,