fix: multiple UI issues (#2249)

* fix: put original borderRadius back to FieldCellButton

* chore: remove the border of card when it is in dark mode

* chore: update NavigatorTextFieldDialog style and organize Insets

* chore: delete unnecessary nullable field
This commit is contained in:
Yijing Huang
2023-04-14 01:21:10 -04:00
committed by GitHub
parent 01ced3bdc0
commit b451303156
7 changed files with 33 additions and 24 deletions

View File

@ -292,9 +292,10 @@ class _BoardContentState extends State<BoardContent> {
color: Theme.of(context).dividerColor,
width: 1.0,
);
final isLightMode = Theme.of(context).brightness == Brightness.light;
return BoxDecoration(
color: Theme.of(context).colorScheme.surface,
border: Border.fromBorderSide(borderSide),
border: isLightMode ? Border.fromBorderSide(borderSide) : null,
borderRadius: const BorderRadius.all(Radius.circular(6)),
);
}

View File

@ -152,10 +152,12 @@ class FieldCellButton extends StatelessWidget {
final VoidCallback onTap;
final FieldPB field;
final int? maxLines;
final BorderRadius? radius;
const FieldCellButton({
required this.field,
required this.onTap,
this.maxLines = 1,
this.radius = BorderRadius.zero,
Key? key,
}) : super(key: key);
@ -172,7 +174,7 @@ class FieldCellButton extends StatelessWidget {
leftIcon: FlowySvg(
name: field.fieldType.iconName(),
),
radius: BorderRadius.circular(6),
radius: radius,
text: FlowyText.medium(
text,
maxLines: maxLines,

View File

@ -301,6 +301,7 @@ class _PropertyCellState extends State<_PropertyCell> {
child: FieldCellButton(
field: widget.cellId.fieldInfo.field,
onTap: () => popover.show(),
radius: BorderRadius.circular(6),
),
),
),