Skip to content

Commit badbbec

Browse files
committed
fix: padding for edit field (#1400)
1 parent aec2053 commit badbbec

File tree

5 files changed

+30
-27
lines changed

5 files changed

+30
-27
lines changed

frontend/app_flowy/lib/plugins/grid/presentation/widgets/cell/select_option_cell/select_option_editor.dart

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -53,20 +53,23 @@ class _SelectOptionCellEditorState extends State<SelectOptionCellEditor> {
5353
)..add(const SelectOptionEditorEvent.initial()),
5454
child: BlocBuilder<SelectOptionCellEditorBloc, SelectOptionEditorState>(
5555
builder: (context, state) {
56-
return CustomScrollView(
57-
shrinkWrap: true,
58-
slivers: [
59-
SliverToBoxAdapter(
60-
child: _TextField(popoverMutex: popoverMutex),
61-
),
62-
const SliverToBoxAdapter(child: VSpace(6)),
63-
const SliverToBoxAdapter(child: TypeOptionSeparator()),
64-
const SliverToBoxAdapter(child: VSpace(6)),
65-
const SliverToBoxAdapter(child: _Title()),
66-
SliverToBoxAdapter(
67-
child: _OptionList(popoverMutex: popoverMutex),
68-
),
69-
],
56+
return Padding(
57+
padding: const EdgeInsets.all(6.0),
58+
child: CustomScrollView(
59+
shrinkWrap: true,
60+
slivers: [
61+
SliverToBoxAdapter(
62+
child: _TextField(popoverMutex: popoverMutex),
63+
),
64+
const SliverToBoxAdapter(child: VSpace(6)),
65+
const SliverToBoxAdapter(child: TypeOptionSeparator()),
66+
const SliverToBoxAdapter(child: VSpace(6)),
67+
const SliverToBoxAdapter(child: _Title()),
68+
SliverToBoxAdapter(
69+
child: _OptionList(popoverMutex: popoverMutex),
70+
),
71+
],
72+
),
7073
);
7174
},
7275
),

frontend/app_flowy/lib/plugins/grid/presentation/widgets/header/field_cell.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,6 @@ class FieldCellButton extends StatelessWidget {
168168
.replaceAll(Characters(''), Characters('\u{200B}'))
169169
.toString();
170170
return FlowyButton(
171-
radius: BorderRadius.zero,
172171
hoverColor: theme.shader6,
173172
onTap: onTap,
174173
leftIcon: svgWidget(field.fieldType.iconName(), color: theme.iconColor),

frontend/app_flowy/lib/plugins/grid/presentation/widgets/header/type_option/select_option_editor.dart

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,13 @@ class SelectOptionTypeOptionEditor extends StatelessWidget {
6262

6363
return SizedBox(
6464
width: 160,
65-
child: CustomScrollView(
66-
slivers: slivers,
67-
controller: ScrollController(),
68-
physics: StyledScrollPhysics(),
65+
child: Padding(
66+
padding: const EdgeInsets.all(6.0),
67+
child: CustomScrollView(
68+
slivers: slivers,
69+
controller: ScrollController(),
70+
physics: StyledScrollPhysics(),
71+
),
6972
),
7073
);
7174
},

frontend/app_flowy/lib/plugins/grid/presentation/widgets/row/row_detail.dart

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class _RowDetailPageState extends State<RowDetailPage> {
5959
child: Column(
6060
children: [
6161
SizedBox(
62-
height: 40,
62+
height: 30,
6363
child: Row(
6464
children: const [Spacer(), _CloseButton()],
6565
),
@@ -264,15 +264,14 @@ class _RowDetailCellState extends State<_RowDetailCell> {
264264
behavior: HitTestBehavior.translucent,
265265
onTap: () => cell.beginFocus.notify(),
266266
child: AccessoryHover(
267-
contentPadding:
268-
const EdgeInsets.symmetric(horizontal: 10, vertical: 12),
267+
contentPadding: const EdgeInsets.symmetric(horizontal: 3, vertical: 3),
269268
child: cell,
270269
),
271270
);
272271

273272
return IntrinsicHeight(
274273
child: ConstrainedBox(
275-
constraints: const BoxConstraints(minHeight: 40),
274+
constraints: const BoxConstraints(minHeight: 30),
276275
child: Row(
277276
crossAxisAlignment: CrossAxisAlignment.stretch,
278277
mainAxisAlignment: MainAxisAlignment.center,
@@ -287,9 +286,7 @@ class _RowDetailCellState extends State<_RowDetailCell> {
287286
child: FieldCellButton(
288287
maxLines: null,
289288
field: widget.cellId.fieldContext.field,
290-
onTap: () {
291-
popover.show();
292-
},
289+
onTap: () => popover.show(),
293290
),
294291
),
295292
),

frontend/app_flowy/packages/flowy_infra_ui/lib/style_widget/button.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ class FlowyButton extends StatelessWidget {
2929

3030
@override
3131
Widget build(BuildContext context) {
32-
return InkWell(
32+
return GestureDetector(
33+
behavior: HitTestBehavior.opaque,
3334
onTap: onTap,
3435
child: FlowyHover(
3536
style: HoverStyle(

0 commit comments

Comments
 (0)