Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Homogeneous UI for toolbar buttons #185

Merged
merged 1 commit into from
Dec 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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