mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
fix: several grid ui improvements (#1347)
This commit is contained in:
parent
cc6bf3cc1e
commit
58ad9a260c
@ -68,7 +68,7 @@ class _DateCellState extends GridCellState<GridDateCell> {
|
||||
controller: _popover,
|
||||
triggerActions: PopoverTriggerFlags.none,
|
||||
direction: PopoverDirection.bottomWithLeftAligned,
|
||||
constraints: BoxConstraints.loose(const Size(320, 500)),
|
||||
constraints: BoxConstraints.loose(const Size(320, 520)),
|
||||
margin: EdgeInsets.zero,
|
||||
child: SizedBox.expand(
|
||||
child: GestureDetector(
|
||||
|
@ -15,6 +15,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:appflowy_popover/appflowy_popover.dart';
|
||||
import '../../../layout/sizes.dart';
|
||||
import '../../common/text_field.dart';
|
||||
import '../field_type_option_editor.dart';
|
||||
import 'builder.dart';
|
||||
|
||||
@ -53,11 +54,14 @@ class DateTypeOptionWidget extends TypeOptionWidget {
|
||||
listener: (context, state) =>
|
||||
typeOptionContext.typeOption = state.typeOption,
|
||||
builder: (context, state) {
|
||||
return Column(children: [
|
||||
_renderDateFormatButton(context, state.typeOption.dateFormat),
|
||||
_renderTimeFormatButton(context, state.typeOption.timeFormat),
|
||||
const _IncludeTimeButton(),
|
||||
]);
|
||||
return Column(
|
||||
children: [
|
||||
const TypeOptionSeparator(),
|
||||
_renderDateFormatButton(context, state.typeOption.dateFormat),
|
||||
_renderTimeFormatButton(context, state.typeOption.timeFormat),
|
||||
const _IncludeTimeButton(),
|
||||
],
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
|
@ -31,7 +31,12 @@ class NumberTypeOptionWidgetBuilder extends TypeOptionWidgetBuilder {
|
||||
);
|
||||
|
||||
@override
|
||||
Widget? build(BuildContext context) => _widget;
|
||||
Widget? build(BuildContext context) {
|
||||
return Column(children: [
|
||||
const TypeOptionSeparator(),
|
||||
_widget,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
class NumberTypeOptionWidget extends TypeOptionWidget {
|
||||
|
@ -66,12 +66,17 @@ class OptionTitle extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final theme = context.read<AppTheme>();
|
||||
return BlocBuilder<SelectOptionTypeOptionBloc, SelectOptionTypeOptionState>(
|
||||
builder: (context, state) {
|
||||
List<Widget> children = [
|
||||
FlowyText.medium(LocaleKeys.grid_field_optionTitle.tr(), fontSize: 12)
|
||||
FlowyText.medium(
|
||||
LocaleKeys.grid_field_optionTitle.tr(),
|
||||
fontSize: 12,
|
||||
color: theme.shader3,
|
||||
)
|
||||
];
|
||||
if (state.options.isNotEmpty) {
|
||||
if (state.options.isNotEmpty && !state.isEditingOption) {
|
||||
children.add(const Spacer());
|
||||
children.add(const _OptionTitleButton());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user