Skip to content

Commit

Permalink
DC: fix GestureDetector
Browse files Browse the repository at this point in the history
  • Loading branch information
sunhuachuang committed Nov 3, 2021
1 parent 0df12c4 commit d27aabc
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/apps/file/list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ class _FilesListState extends State<FilesList> {
final params = file.fileType().params();

return GestureDetector(
onLongPressDown: desktop ? null : (details) => _showItemMenu(details, lang, file),
onSecondaryLongPressDown: desktop ? (details) => _showItemMenu(details, lang, file) : null,
onLongPressEnd: desktop ? null : (details) => _showItemMenu(details, lang, file),
onSecondaryTapUp: desktop ? (details) => _showItemMenu(details, lang, file) : null,
onTap: () {
if (file.isDirectory()) {
_nextDirectory(file);
Expand Down Expand Up @@ -519,7 +519,7 @@ class _MoveToScreenState extends State<_MoveToScreen> {
final color = Theme.of(context).colorScheme;
final lang = AppLocalizations.of(context);

double maxHeight = MediaQuery.of(context).size.height - 400;
double maxHeight = MediaQuery.of(context).size.height - 500;
if (maxHeight < 100.0) {
maxHeight = 100.0;
}
Expand All @@ -529,12 +529,14 @@ class _MoveToScreenState extends State<_MoveToScreen> {
Row(children: this._pathWidget(lang)),
Container(
height: maxHeight,
decoration: BoxDecoration(color: color.secondary),
child: SingleChildScrollView(
child: Column(
children: List<Widget>.generate(_list.length, (i) => _item(_list[i], i),
))
)
),
const SizedBox(height: 20.0),
ButtonText(
text: lang.ok,
enable: this._selected != null,
Expand Down

0 comments on commit d27aabc

Please sign in to comment.