mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
chore: add more space between font item and font menu
This commit is contained in:
parent
d5f8ce5435
commit
5dfc470873
@ -16,6 +16,7 @@ final customizeFontToolbarItem = ToolbarItem(
|
||||
cursor: SystemMouseCursors.click,
|
||||
child: FontFamilyDropDown(
|
||||
currentFontFamily: '',
|
||||
offset: const Offset(0, 12),
|
||||
popoverController: popoverController,
|
||||
onOpen: () => keepEditorFocusNotifier.value += 1,
|
||||
onClose: () => keepEditorFocusNotifier.value -= 1,
|
||||
|
@ -60,6 +60,7 @@ class FontFamilyDropDown extends StatefulWidget {
|
||||
this.onFontFamilyChanged,
|
||||
this.child,
|
||||
this.popoverController,
|
||||
this.offset,
|
||||
});
|
||||
|
||||
final String currentFontFamily;
|
||||
@ -68,6 +69,7 @@ class FontFamilyDropDown extends StatefulWidget {
|
||||
final void Function(String fontFamily)? onFontFamilyChanged;
|
||||
final Widget? child;
|
||||
final PopoverController? popoverController;
|
||||
final Offset? offset;
|
||||
|
||||
@override
|
||||
State<FontFamilyDropDown> createState() => _FontFamilyDropDownState();
|
||||
@ -87,6 +89,7 @@ class _FontFamilyDropDownState extends State<FontFamilyDropDown> {
|
||||
query.value = '';
|
||||
widget.onClose?.call();
|
||||
},
|
||||
offset: widget.offset,
|
||||
child: widget.child,
|
||||
popupBuilder: (_) {
|
||||
widget.onOpen?.call();
|
||||
|
@ -74,6 +74,7 @@ class ThemeValueDropDown extends StatefulWidget {
|
||||
this.onClose,
|
||||
this.child,
|
||||
this.popoverController,
|
||||
this.offset,
|
||||
});
|
||||
|
||||
final String currentValue;
|
||||
@ -82,6 +83,7 @@ class ThemeValueDropDown extends StatefulWidget {
|
||||
final void Function()? onClose;
|
||||
final Widget? child;
|
||||
final PopoverController? popoverController;
|
||||
final Offset? offset;
|
||||
|
||||
@override
|
||||
State<ThemeValueDropDown> createState() => _ThemeValueDropDownState();
|
||||
@ -93,13 +95,14 @@ class _ThemeValueDropDownState extends State<ThemeValueDropDown> {
|
||||
return AppFlowyPopover(
|
||||
key: widget.popoverKey,
|
||||
controller: widget.popoverController,
|
||||
direction: PopoverDirection.bottomWithRightAligned,
|
||||
direction: PopoverDirection.bottomWithCenterAligned,
|
||||
popupBuilder: widget.popupBuilder,
|
||||
constraints: const BoxConstraints(
|
||||
minWidth: 80,
|
||||
maxWidth: 160,
|
||||
maxHeight: 400,
|
||||
),
|
||||
offset: widget.offset,
|
||||
onClose: widget.onClose,
|
||||
child: widget.child ??
|
||||
FlowyTextButton(
|
||||
|
Loading…
Reference in New Issue
Block a user