Restore look & feel for toggle buttons

pull/1633/head
Aleksei 1 year ago
parent ad3be0c431
commit e168600c58
  1. 5
      lib/src/widgets/toolbar/buttons/clear_format_button.dart
  2. 2
      lib/src/widgets/toolbar/buttons/color/color_button.dart
  3. 7
      lib/src/widgets/toolbar/buttons/link_style2_button.dart
  4. 7
      lib/src/widgets/toolbar/buttons/link_style_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,
);

@ -200,7 +200,7 @@ class QuillToolbarColorButtonState extends State<QuillToolbarColorButton> {
icon: Icon(iconData,
size: iconSize,
color: widget.isBackground ? iconColorBackground : iconColor),
isFilled: false,
isFilled: _isToggledColor || _isToggledBackground,
iconFilledStyle: IconButton.styleFrom(
backgroundColor:
widget.isBackground ? fillColorBackground : fillColor),

@ -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,
);

@ -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,
);

Loading…
Cancel
Save