mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
fix: mobile UI (#4121)
* fix: use default splash color * chore: improve card border UI
This commit is contained in:
parent
177cca60c4
commit
8cf6ab32f0
@ -8,6 +8,7 @@ import 'package:appflowy/plugins/database_view/grid/presentation/widgets/header/
|
|||||||
import 'package:appflowy/plugins/database_view/widgets/card/card.dart';
|
import 'package:appflowy/plugins/database_view/widgets/card/card.dart';
|
||||||
import 'package:appflowy/plugins/database_view/widgets/card/card_cell_builder.dart';
|
import 'package:appflowy/plugins/database_view/widgets/card/card_cell_builder.dart';
|
||||||
import 'package:appflowy/plugins/database_view/widgets/card/cells/card_cell.dart';
|
import 'package:appflowy/plugins/database_view/widgets/card/cells/card_cell.dart';
|
||||||
|
import 'package:appflowy/workspace/application/settings/appearance/appearance_cubit.dart';
|
||||||
import 'package:appflowy_board/appflowy_board.dart';
|
import 'package:appflowy_board/appflowy_board.dart';
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flowy_infra_ui/flowy_infra_ui.dart';
|
import 'package:flowy_infra_ui/flowy_infra_ui.dart';
|
||||||
@ -201,22 +202,29 @@ class _MobileBoardContentState extends State<MobileBoardContent> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
BoxDecoration _makeBoxDecoration(BuildContext context) {
|
BoxDecoration _makeBoxDecoration(BuildContext context) {
|
||||||
|
final themeMode = context.read<AppearanceSettingsCubit>().state.themeMode;
|
||||||
return BoxDecoration(
|
return BoxDecoration(
|
||||||
color: Theme.of(context).colorScheme.surface,
|
color: Theme.of(context).colorScheme.background,
|
||||||
borderRadius: const BorderRadius.all(Radius.circular(8)),
|
borderRadius: const BorderRadius.all(Radius.circular(8)),
|
||||||
border: Border.fromBorderSide(
|
border: themeMode == ThemeMode.light
|
||||||
BorderSide(
|
? Border.fromBorderSide(
|
||||||
color: Theme.of(context).colorScheme.outline.withOpacity(0.5),
|
BorderSide(
|
||||||
),
|
color: Theme.of(context).colorScheme.outline.withOpacity(0.5),
|
||||||
),
|
),
|
||||||
boxShadow: [
|
)
|
||||||
// card shadow
|
: null,
|
||||||
BoxShadow(
|
boxShadow:
|
||||||
color: Theme.of(context).colorScheme.outline.withOpacity(0.5),
|
// The shadow is only visible in light mode.
|
||||||
blurRadius: 4,
|
themeMode == ThemeMode.light
|
||||||
offset: const Offset(0, 2),
|
? [
|
||||||
),
|
BoxShadow(
|
||||||
],
|
color:
|
||||||
|
Theme.of(context).colorScheme.outline.withOpacity(0.5),
|
||||||
|
blurRadius: 4,
|
||||||
|
offset: const Offset(0, 2),
|
||||||
|
),
|
||||||
|
]
|
||||||
|
: null,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -121,11 +121,7 @@ class _RowCardState<T> extends State<RowCard<T>> {
|
|||||||
},
|
},
|
||||||
builder: (context, state) {
|
builder: (context, state) {
|
||||||
if (PlatformExtension.isMobile) {
|
if (PlatformExtension.isMobile) {
|
||||||
return RowCardContainer(
|
return GestureDetector(
|
||||||
buildAccessoryWhen: () => state.isEditing == false,
|
|
||||||
accessories: const [],
|
|
||||||
openAccessory: (p0) {},
|
|
||||||
openCard: (context) => widget.openCard(context),
|
|
||||||
child: MobileCardContent<T>(
|
child: MobileCardContent<T>(
|
||||||
cellBuilder: widget.cellBuilder,
|
cellBuilder: widget.cellBuilder,
|
||||||
styleConfiguration: widget.styleConfiguration,
|
styleConfiguration: widget.styleConfiguration,
|
||||||
@ -133,6 +129,7 @@ class _RowCardState<T> extends State<RowCard<T>> {
|
|||||||
renderHook: widget.renderHook,
|
renderHook: widget.renderHook,
|
||||||
cardData: widget.cardData,
|
cardData: widget.cardData,
|
||||||
),
|
),
|
||||||
|
onTap: () => widget.openCard(context),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -159,10 +159,6 @@ class MobileAppearance extends BaseAppearance {
|
|||||||
padding: MaterialStateProperty.all(
|
padding: MaterialStateProperty.all(
|
||||||
const EdgeInsets.symmetric(horizontal: 8, vertical: 12),
|
const EdgeInsets.symmetric(horizontal: 8, vertical: 12),
|
||||||
),
|
),
|
||||||
// splash color
|
|
||||||
overlayColor: MaterialStateProperty.all(
|
|
||||||
Colors.grey[100],
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
textButtonTheme: TextButtonThemeData(
|
textButtonTheme: TextButtonThemeData(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user