mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
feat: modify svg size
This commit is contained in:
parent
7489455c20
commit
e4c3a3ae84
@ -43,7 +43,7 @@ class BulletedListTextNodeWidget extends StatefulWidget {
|
|||||||
|
|
||||||
class _BulletedListTextNodeWidgetState extends State<BulletedListTextNodeWidget>
|
class _BulletedListTextNodeWidgetState extends State<BulletedListTextNodeWidget>
|
||||||
with Selectable, DefaultSelectable {
|
with Selectable, DefaultSelectable {
|
||||||
final _richTextKey = GlobalKey(debugLabel: 'heading_text');
|
final _richTextKey = GlobalKey(debugLabel: 'bulleted_list_text');
|
||||||
final leftPadding = 20.0;
|
final leftPadding = 20.0;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -59,7 +59,8 @@ class _BulletedListTextNodeWidgetState extends State<BulletedListTextNodeWidget>
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Row(
|
return Row(
|
||||||
children: [
|
children: [
|
||||||
const FlowySvg(
|
FlowySvg(
|
||||||
|
size: Size.square(leftPadding),
|
||||||
name: 'point',
|
name: 'point',
|
||||||
),
|
),
|
||||||
FlowyRichText(
|
FlowyRichText(
|
||||||
|
@ -44,24 +44,17 @@ class CheckboxNodeWidget extends StatefulWidget {
|
|||||||
|
|
||||||
class _CheckboxNodeWidgetState extends State<CheckboxNodeWidget>
|
class _CheckboxNodeWidgetState extends State<CheckboxNodeWidget>
|
||||||
with Selectable, DefaultSelectable {
|
with Selectable, DefaultSelectable {
|
||||||
final _checkboxKey = GlobalKey(debugLabel: 'checkbox');
|
|
||||||
final _richTextKey = GlobalKey(debugLabel: 'checkbox_text');
|
final _richTextKey = GlobalKey(debugLabel: 'checkbox_text');
|
||||||
|
|
||||||
|
final leftPadding = 20.0;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Selectable<StatefulWidget> get forward =>
|
Selectable<StatefulWidget> get forward =>
|
||||||
_richTextKey.currentState as Selectable;
|
_richTextKey.currentState as Selectable;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Offset get baseOffset {
|
Offset get baseOffset {
|
||||||
final width = _checkboxKey.currentContext
|
return Offset(leftPadding, 0);
|
||||||
?.findRenderObject()
|
|
||||||
?.unwrapOrNull<RenderBox>()
|
|
||||||
?.size
|
|
||||||
.width;
|
|
||||||
if (width != null) {
|
|
||||||
return Offset(width, 0);
|
|
||||||
}
|
|
||||||
return Offset.zero;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -80,7 +73,7 @@ class _CheckboxNodeWidgetState extends State<CheckboxNodeWidget>
|
|||||||
children: [
|
children: [
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
child: FlowySvg(
|
child: FlowySvg(
|
||||||
key: _checkboxKey,
|
size: Size.square(leftPadding),
|
||||||
name: check ? 'check' : 'uncheck',
|
name: check ? 'check' : 'uncheck',
|
||||||
),
|
),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
|
@ -61,6 +61,7 @@ class _NumberListTextNodeWidgetState extends State<NumberListTextNodeWidget>
|
|||||||
return Row(
|
return Row(
|
||||||
children: [
|
children: [
|
||||||
FlowySvg(
|
FlowySvg(
|
||||||
|
size: Size.square(leftPadding),
|
||||||
number: widget.textNode.attributes.number,
|
number: widget.textNode.attributes.number,
|
||||||
),
|
),
|
||||||
FlowyRichText(
|
FlowyRichText(
|
||||||
|
@ -58,7 +58,8 @@ class _QuotedTextNodeWidgetState extends State<QuotedTextNodeWidget>
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Row(
|
return Row(
|
||||||
children: [
|
children: [
|
||||||
const FlowySvg(
|
FlowySvg(
|
||||||
|
size: Size.square(leftPadding),
|
||||||
name: 'quote',
|
name: 'quote',
|
||||||
),
|
),
|
||||||
FlowyRichText(
|
FlowyRichText(
|
||||||
|
@ -90,7 +90,7 @@ class _FlowyInputState extends State<FlowyInput>
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
void apply(List<TextEditingDelta> deltas) {
|
void apply(List<TextEditingDelta> deltas) {
|
||||||
// TODO: implement the detail
|
// TODO: implement the detail
|
||||||
for (final delta in deltas) {
|
for (final delta in deltas) {
|
||||||
if (delta is TextEditingDeltaInsertion) {
|
if (delta is TextEditingDeltaInsertion) {
|
||||||
} else if (delta is TextEditingDeltaDeletion) {
|
} else if (delta is TextEditingDeltaDeletion) {
|
||||||
|
Loading…
Reference in New Issue
Block a user