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) { onTapUp: (details) {
setState(() => scale = 1.0); setState(() => scale = 1.0);
HapticFeedbackType.vibrate.call(); HapticFeedbackType.light.call();
widget.onTapUp(); widget.onTapUp();
}, },

View File

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

View File

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