From 28dd44fcf2a4879d622c5232ad499f90f6a0b50f Mon Sep 17 00:00:00 2001 From: Dmitry Ukhanov Date: Wed, 3 Apr 2024 03:59:53 +0300 Subject: [PATCH] Feat #1799 (#1800) --- .../widgets/toolbar/buttons/font_family_button.dart | 10 ++++++++-- lib/src/widgets/toolbar/buttons/font_size_button.dart | 3 +-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/lib/src/widgets/toolbar/buttons/font_family_button.dart b/lib/src/widgets/toolbar/buttons/font_family_button.dart index c8f57bd5..a8ba667b 100644 --- a/lib/src/widgets/toolbar/buttons/font_family_button.dart +++ b/lib/src/widgets/toolbar/buttons/font_family_button.dart @@ -120,6 +120,13 @@ class QuillToolbarFontFamilyButtonState return iconSize ?? baseFontSize ?? kDefaultIconSize; } + double get iconButtonFactor { + final baseIconFactor = + context.quillToolbarBaseButtonOptions?.iconButtonFactor; + final iconButtonFactor = widget.options.iconButtonFactor; + return iconButtonFactor ?? baseIconFactor ?? kDefaultIconButtonFactor; + } + VoidCallback? get afterButtonPressed { return options.afterButtonPressed ?? context.quillToolbarBaseButtonOptions?.afterButtonPressed; @@ -266,10 +273,9 @@ class QuillToolbarFontFamilyButtonState ), ), ), - const SizedBox(width: 3), Icon( Icons.arrow_drop_down, - size: iconSize / 1.15, + size: iconSize * iconButtonFactor, // color: iconTheme?.iconUnselectedFillColor ?? theme.iconTheme.color, ) ], diff --git a/lib/src/widgets/toolbar/buttons/font_size_button.dart b/lib/src/widgets/toolbar/buttons/font_size_button.dart index 4ebe5055..17807c47 100644 --- a/lib/src/widgets/toolbar/buttons/font_size_button.dart +++ b/lib/src/widgets/toolbar/buttons/font_size_button.dart @@ -234,10 +234,9 @@ class QuillToolbarFontSizeButtonState ), ), ), - const SizedBox(width: 3), Icon( Icons.arrow_drop_down, - size: iconSize / 1.15, + size: iconSize * iconButtonFactor, ) ], ),