chore: use light haptic feedback (#5838)

* chore: use light haptic feedback

* chore: optimize tabbar & side action animation
This commit is contained in:
Lucas.Xu 2024-07-30 19:53:11 +08:00 committed by GitHub
parent 735a09b333
commit 81532d014e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 10 additions and 7 deletions

View File

@ -36,7 +36,7 @@ class _AnimatedGestureDetectorState extends State<AnimatedGestureDetector> {
onTapUp: (details) {
setState(() => scale = 1.0);
HapticFeedbackType.vibrate.call();
HapticFeedbackType.light.call();
widget.onTapUp();
},

View File

@ -167,15 +167,16 @@ class _Pages extends StatelessWidget {
onSelected: context.pushView,
endActionPane: (context) {
final view = context.read<ViewBloc>().state.view;
final actions = [
MobilePaneActionType.more,
if (view.layout == ViewLayoutPB.Document)
MobilePaneActionType.add,
];
return buildEndActionPane(
context,
[
MobilePaneActionType.more,
if (view.layout == ViewLayoutPB.Document)
MobilePaneActionType.add,
],
actions,
spaceType: spaceType,
spaceRatio: 4,
spaceRatio: actions.length == 1 ? 3 : 4,
);
},
),

View File

@ -23,10 +23,12 @@ class MobileSpaceTabBar extends StatelessWidget {
final labelStyle = baseStyle?.copyWith(
fontWeight: FontWeight.w600,
fontSize: 16.0,
height: 20 / 16,
);
final unselectedLabelStyle = baseStyle?.copyWith(
fontWeight: FontWeight.w400,
fontSize: 15.0,
height: 20 / 15,
);
return Container(