Skip to content

Commit

Permalink
Homogeneous UI for toolbar buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
amantoux committed Dec 7, 2023
1 parent 6ba157f commit c3c66bb
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions packages/fleather/lib/src/widgets/editor_toolbar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -458,17 +458,16 @@ class _ColorButtonState extends State<ColorButton> {
@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);
Expand Down Expand Up @@ -617,6 +616,12 @@ class _SelectHeadingButtonState extends State<SelectHeadingButton> {
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] ?? ''),
),
Expand Down

0 comments on commit c3c66bb

Please sign in to comment.