fix: improve look of select option list (#1168)

This commit is contained in:
Richard Shiue 2022-10-01 21:13:56 +08:00 committed by GitHub
parent 5e7a54183a
commit 3dc64f3d50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 27 deletions

View File

@ -130,15 +130,11 @@ class SelectOptionTagCell extends StatelessWidget {
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Flexible( SelectOptionTag.fromOption(
fit: FlexFit.loose,
flex: 2,
child: SelectOptionTag.fromOption(
context: context, context: context,
option: option, option: option,
onSelected: () => onSelected(option), onSelected: () => onSelected(option),
), ),
),
const Spacer(), const Spacer(),
...children, ...children,
], ],

View File

@ -248,10 +248,6 @@ class _SelectOptionCellState extends State<_SelectOptionCell> {
mutex: widget.popoverMutex, mutex: widget.popoverMutex,
child: SizedBox( child: SizedBox(
height: GridSize.typeOptionItemHeight, height: GridSize.typeOptionItemHeight,
child: Row(
children: [
Flexible(
fit: FlexFit.loose,
child: SelectOptionTagCell( child: SelectOptionTagCell(
option: widget.option, option: widget.option,
onSelected: (option) { onSelected: (option) {
@ -265,15 +261,12 @@ class _SelectOptionCellState extends State<_SelectOptionCell> {
padding: const EdgeInsets.only(right: 6), padding: const EdgeInsets.only(right: 6),
child: svgWidget("grid/checkmark"), child: svgWidget("grid/checkmark"),
), ),
],
),
),
FlowyIconButton( FlowyIconButton(
width: 30, width: 30,
onPressed: () => _popoverController.show(), onPressed: () => _popoverController.show(),
iconPadding: const EdgeInsets.fromLTRB(4, 4, 4, 4), iconPadding: const EdgeInsets.fromLTRB(4, 4, 4, 4),
icon: svgWidget("editor/details", color: theme.iconColor), icon: svgWidget("editor/details", color: theme.iconColor),
) ),
], ],
), ),
), ),