chore: adjust buttons padding in row record page

This commit is contained in:
Lucas.Xu 2024-08-17 11:22:30 +08:00
parent 9853fbfc10
commit 9f81b210e4
4 changed files with 6 additions and 4 deletions

View File

@ -367,6 +367,7 @@ class MobileRowDetailPageContentState
if (rowDetailState.numHiddenFields != 0) ...[ if (rowDetailState.numHiddenFields != 0) ...[
const ToggleHiddenFieldsVisibilityButton(), const ToggleHiddenFieldsVisibilityButton(),
], ],
const VSpace(8.0),
OpenRowPageButton( OpenRowPageButton(
documentId: rowController.rowMeta.documentId, documentId: rowController.rowMeta.documentId,
), ),

View File

@ -22,7 +22,7 @@ class MobileRowDetailCreateFieldButton extends StatelessWidget {
return ConstrainedBox( return ConstrainedBox(
constraints: BoxConstraints( constraints: BoxConstraints(
minWidth: double.infinity, minWidth: double.infinity,
minHeight: GridSize.headerHeight, maxHeight: GridSize.headerHeight,
), ),
child: TextButton.icon( child: TextButton.icon(
style: Theme.of(context).textButtonTheme.style?.copyWith( style: Theme.of(context).textButtonTheme.style?.copyWith(
@ -37,7 +37,7 @@ class MobileRowDetailCreateFieldButton extends StatelessWidget {
alignment: AlignmentDirectional.centerStart, alignment: AlignmentDirectional.centerStart,
splashFactory: NoSplash.splashFactory, splashFactory: NoSplash.splashFactory,
padding: const WidgetStatePropertyAll( padding: const WidgetStatePropertyAll(
EdgeInsets.symmetric(vertical: 14, horizontal: 6), EdgeInsets.symmetric(horizontal: 6, vertical: 2),
), ),
), ),
label: FlowyText.medium( label: FlowyText.medium(

View File

@ -39,7 +39,7 @@ class _OpenRowPageButtonState extends State<OpenRowPageButton> {
return ConstrainedBox( return ConstrainedBox(
constraints: BoxConstraints( constraints: BoxConstraints(
minWidth: double.infinity, minWidth: double.infinity,
minHeight: GridSize.headerHeight, maxHeight: GridSize.buttonHeight,
), ),
child: TextButton.icon( child: TextButton.icon(
style: Theme.of(context).textButtonTheme.style?.copyWith( style: Theme.of(context).textButtonTheme.style?.copyWith(
@ -54,7 +54,7 @@ class _OpenRowPageButtonState extends State<OpenRowPageButton> {
alignment: AlignmentDirectional.centerStart, alignment: AlignmentDirectional.centerStart,
splashFactory: NoSplash.splashFactory, splashFactory: NoSplash.splashFactory,
padding: const WidgetStatePropertyAll( padding: const WidgetStatePropertyAll(
EdgeInsets.symmetric(vertical: 14, horizontal: 6), EdgeInsets.symmetric(horizontal: 6),
), ),
), ),
label: FlowyText.medium( label: FlowyText.medium(

View File

@ -6,6 +6,7 @@ class GridSize {
static double get scrollBarSize => 8 * scale; static double get scrollBarSize => 8 * scale;
static double get headerHeight => 40 * scale; static double get headerHeight => 40 * scale;
static double get buttonHeight => 38 * scale;
static double get footerHeight => 40 * scale; static double get footerHeight => 40 * scale;
static double get horizontalHeaderPadding => static double get horizontalHeaderPadding =>
PlatformExtension.isDesktop ? 40 * scale : 16 * scale; PlatformExtension.isDesktop ? 40 * scale : 16 * scale;