Skip to content

Commit

Permalink
fix: center bullet/number points
Browse files Browse the repository at this point in the history
  • Loading branch information
adil192 committed May 24, 2023
1 parent 726607f commit fa7147b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
3 changes: 1 addition & 2 deletions lib/src/widgets/style_widgets/bullet_point.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@ class QuillBulletPoint extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container(
alignment: AlignmentDirectional.topEnd,
alignment: AlignmentDirectional.topCenter,
width: width,
padding: const EdgeInsetsDirectional.only(end: 13),
child: Text('•', style: style),
);
}
Expand Down
8 changes: 2 additions & 6 deletions lib/src/widgets/style_widgets/number_point.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ class QuillNumberPoint extends StatelessWidget {
required this.width,
required this.attrs,
this.withDot = true,
this.padding = 0.0,
Key? key,
}) : super(key: key);

Expand All @@ -23,7 +22,6 @@ class QuillNumberPoint extends StatelessWidget {
final double width;
final Map<String, Attribute> attrs;
final bool withDot;
final double padding;

@override
Widget build(BuildContext context) {
Expand All @@ -33,9 +31,8 @@ class QuillNumberPoint extends StatelessWidget {
indentLevelCounts.clear();
indentLevelCounts[0] = 1;
return Container(
alignment: AlignmentDirectional.topEnd,
alignment: AlignmentDirectional.topCenter,
width: width,
padding: EdgeInsetsDirectional.only(end: padding),
child: Text(withDot ? '$s.' : s, style: style),
);
}
Expand Down Expand Up @@ -64,9 +61,8 @@ class QuillNumberPoint extends StatelessWidget {
// level % 3 == 0 goes back to 1. 2. 3.

return Container(
alignment: AlignmentDirectional.topEnd,
alignment: AlignmentDirectional.topCenter,
width: width,
padding: EdgeInsetsDirectional.only(end: padding),
child: Text(withDot ? '$s.' : s, style: style),
);
}
Expand Down
2 changes: 0 additions & 2 deletions lib/src/widgets/text_block.dart
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@ class EditableTextBlock extends StatelessWidget {
style: defaultStyles.leading!.style,
attrs: attrs,
width: fontSize * 2,
padding: fontSize / 2,
);
}

Expand Down Expand Up @@ -223,7 +222,6 @@ class EditableTextBlock extends StatelessWidget {
.copyWith(color: defaultStyles.code!.style.color!.withOpacity(0.4)),
width: fontSize * 2,
attrs: attrs,
padding: fontSize,
withDot: false,
);
}
Expand Down

0 comments on commit fa7147b

Please sign in to comment.