From c3c66bbee78730a1c49483f763374bb567fbb1f0 Mon Sep 17 00:00:00 2001 From: Alan Mantoux Date: Thu, 7 Dec 2023 10:31:39 +0100 Subject: [PATCH] Homogeneous UI for toolbar buttons --- .../lib/src/widgets/editor_toolbar.dart | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/packages/fleather/lib/src/widgets/editor_toolbar.dart b/packages/fleather/lib/src/widgets/editor_toolbar.dart index 6505be5a..6c8ccfef 100644 --- a/packages/fleather/lib/src/widgets/editor_toolbar.dart +++ b/packages/fleather/lib/src/widgets/editor_toolbar.dart @@ -458,17 +458,16 @@ class _ColorButtonState extends State { @override Widget build(BuildContext context) { return ConstrainedBox( - constraints: BoxConstraints.tightFor( - width: buttonSize, - height: buttonSize, - ), + constraints: + BoxConstraints.tightFor(width: buttonSize, height: buttonSize), child: RawMaterialButton( visualDensity: VisualDensity.compact, shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(2)), padding: EdgeInsets.zero, elevation: 0, - hoverElevation: 1, - highlightElevation: 1, + fillColor: Theme.of(context).canvasColor, + highlightElevation: 0, + hoverElevation: 0, onPressed: () async { final selectedColor = await (widget.pickColor ?? _defaultPickColor)(context); @@ -617,6 +616,12 @@ class _SelectHeadingButtonState extends State { return ConstrainedBox( constraints: BoxConstraints.tightFor(height: buttonHeight), child: RawMaterialButton( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(2)), + padding: EdgeInsets.zero, + fillColor: Theme.of(context).canvasColor, + elevation: 0, + hoverElevation: 0, + highlightElevation: 0, onPressed: _selectHeading, child: Text(_headingToText[current] ?? ''), ),