diff --git a/lib/src/widgets/toolbar/buttons/clear_format_button.dart b/lib/src/widgets/toolbar/buttons/clear_format_button.dart index 1e8d2b72..a535e910 100644 --- a/lib/src/widgets/toolbar/buttons/clear_format_button.dart +++ b/lib/src/widgets/toolbar/buttons/clear_format_button.dart @@ -107,11 +107,14 @@ class QuillToolbarClearFormatButton extends StatelessWidget { final theme = Theme.of(context); final iconColor = iconTheme?.iconUnselectedColor ?? theme.iconTheme.color; + final fillColor = iconTheme?.iconUnselectedFillColor ?? theme.canvasColor; return QuillToolbarIconButton( tooltip: tooltip, - icon: Icon(iconData, size: iconSize * iconButtonFactor, color: iconColor), + size: iconSize * iconButtonFactor, + icon: Icon(iconData, size: iconSize, color: iconColor), isFilled: false, + iconFilledStyle: IconButton.styleFrom(backgroundColor: fillColor), onPressed: _sharedOnPressed, afterPressed: afterButtonPressed, ); diff --git a/lib/src/widgets/toolbar/buttons/color/color_button.dart b/lib/src/widgets/toolbar/buttons/color/color_button.dart index dd9356cc..55efd75b 100644 --- a/lib/src/widgets/toolbar/buttons/color/color_button.dart +++ b/lib/src/widgets/toolbar/buttons/color/color_button.dart @@ -200,7 +200,7 @@ class QuillToolbarColorButtonState extends State { icon: Icon(iconData, size: iconSize, color: widget.isBackground ? iconColorBackground : iconColor), - isFilled: false, + isFilled: _isToggledColor || _isToggledBackground, iconFilledStyle: IconButton.styleFrom( backgroundColor: widget.isBackground ? fillColorBackground : fillColor), diff --git a/lib/src/widgets/toolbar/buttons/link_style2_button.dart b/lib/src/widgets/toolbar/buttons/link_style2_button.dart index f1912a05..88a37e6d 100644 --- a/lib/src/widgets/toolbar/buttons/link_style2_button.dart +++ b/lib/src/widgets/toolbar/buttons/link_style2_button.dart @@ -148,14 +148,19 @@ class _QuillToolbarLinkStyleButton2State final isToggled = _getLinkAttributeValue() != null; return QuillToolbarIconButton( tooltip: tooltip, + size: iconSize * iconButtonFactor, icon: Icon( iconData, - size: iconSize * iconButtonFactor, + size: iconSize, color: isToggled ? (iconTheme?.iconSelectedColor ?? theme.primaryIconTheme.color) : (iconTheme?.iconUnselectedColor ?? theme.iconTheme.color), ), isFilled: isToggled, + iconFilledStyle: IconButton.styleFrom( + backgroundColor: isToggled + ? (iconTheme?.iconSelectedFillColor ?? theme.primaryColor) + : (iconTheme?.iconUnselectedFillColor ?? theme.canvasColor)), onPressed: _openLinkDialog, afterPressed: afterButtonPressed, ); diff --git a/lib/src/widgets/toolbar/buttons/link_style_button.dart b/lib/src/widgets/toolbar/buttons/link_style_button.dart index 363ef45b..c4bd3e35 100644 --- a/lib/src/widgets/toolbar/buttons/link_style_button.dart +++ b/lib/src/widgets/toolbar/buttons/link_style_button.dart @@ -140,14 +140,19 @@ class QuillToolbarLinkStyleButtonState final theme = Theme.of(context); return QuillToolbarIconButton( tooltip: tooltip, + size: iconSize * iconButtonFactor, icon: Icon( iconData, - size: iconSize * iconButtonFactor, + size: iconSize, color: isToggled ? (iconTheme?.iconSelectedColor ?? theme.primaryIconTheme.color) : (iconTheme?.iconUnselectedColor ?? theme.iconTheme.color), ), isFilled: isToggled, + iconFilledStyle: IconButton.styleFrom( + backgroundColor: isToggled + ? (iconTheme?.iconSelectedFillColor ?? theme.primaryColor) + : (iconTheme?.iconUnselectedFillColor ?? theme.canvasColor)), onPressed: () => _openLinkDialog(context), afterPressed: afterButtonPressed, );