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:
@ -68,7 +68,7 @@ class _DateCellState extends GridCellState<GridDateCell> {
|
|||||||
controller: _popover,
|
controller: _popover,
|
||||||
triggerActions: PopoverTriggerFlags.none,
|
triggerActions: PopoverTriggerFlags.none,
|
||||||
direction: PopoverDirection.bottomWithLeftAligned,
|
direction: PopoverDirection.bottomWithLeftAligned,
|
||||||
constraints: BoxConstraints.loose(const Size(320, 500)),
|
constraints: BoxConstraints.loose(const Size(320, 520)),
|
||||||
margin: EdgeInsets.zero,
|
margin: EdgeInsets.zero,
|
||||||
child: SizedBox.expand(
|
child: SizedBox.expand(
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
|
@ -15,6 +15,7 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:appflowy_popover/appflowy_popover.dart';
|
import 'package:appflowy_popover/appflowy_popover.dart';
|
||||||
import '../../../layout/sizes.dart';
|
import '../../../layout/sizes.dart';
|
||||||
|
import '../../common/text_field.dart';
|
||||||
import '../field_type_option_editor.dart';
|
import '../field_type_option_editor.dart';
|
||||||
import 'builder.dart';
|
import 'builder.dart';
|
||||||
|
|
||||||
@ -53,11 +54,14 @@ class DateTypeOptionWidget extends TypeOptionWidget {
|
|||||||
listener: (context, state) =>
|
listener: (context, state) =>
|
||||||
typeOptionContext.typeOption = state.typeOption,
|
typeOptionContext.typeOption = state.typeOption,
|
||||||
builder: (context, state) {
|
builder: (context, state) {
|
||||||
return Column(children: [
|
return Column(
|
||||||
_renderDateFormatButton(context, state.typeOption.dateFormat),
|
children: [
|
||||||
_renderTimeFormatButton(context, state.typeOption.timeFormat),
|
const TypeOptionSeparator(),
|
||||||
const _IncludeTimeButton(),
|
_renderDateFormatButton(context, state.typeOption.dateFormat),
|
||||||
]);
|
_renderTimeFormatButton(context, state.typeOption.timeFormat),
|
||||||
|
const _IncludeTimeButton(),
|
||||||
|
],
|
||||||
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
@ -31,7 +31,12 @@ class NumberTypeOptionWidgetBuilder extends TypeOptionWidgetBuilder {
|
|||||||
);
|
);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget? build(BuildContext context) => _widget;
|
Widget? build(BuildContext context) {
|
||||||
|
return Column(children: [
|
||||||
|
const TypeOptionSeparator(),
|
||||||
|
_widget,
|
||||||
|
]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class NumberTypeOptionWidget extends TypeOptionWidget {
|
class NumberTypeOptionWidget extends TypeOptionWidget {
|
||||||
|
@ -66,12 +66,17 @@ class OptionTitle extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
final theme = context.read<AppTheme>();
|
||||||
return BlocBuilder<SelectOptionTypeOptionBloc, SelectOptionTypeOptionState>(
|
return BlocBuilder<SelectOptionTypeOptionBloc, SelectOptionTypeOptionState>(
|
||||||
builder: (context, state) {
|
builder: (context, state) {
|
||||||
List<Widget> children = [
|
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 Spacer());
|
||||||
children.add(const _OptionTitleButton());
|
children.add(const _OptionTitleButton());
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user