mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-04-18 20:05:05 -04:00
fix: nested block padding issues
This commit is contained in:
parent
a2474871cf
commit
6bc1a30dfe
2 changed files with 13 additions and 4 deletions
|
@ -102,9 +102,16 @@ BlockComponentConfiguration _buildDefaultConfiguration(BuildContext context) {
|
|||
|
||||
return const EdgeInsets.symmetric(vertical: 5.0);
|
||||
},
|
||||
indentPadding: (node, textDirection) => textDirection == TextDirection.ltr
|
||||
? const EdgeInsets.only(left: 26.0)
|
||||
: const EdgeInsets.only(right: 26.0),
|
||||
indentPadding: (node, textDirection) {
|
||||
double padding = 26.0;
|
||||
// only add indent padding for the top level node to align the children
|
||||
if (UniversalPlatform.isMobile && node.path.length == 1) {
|
||||
padding += EditorStyleCustomizer.nodeHorizontalPadding;
|
||||
}
|
||||
return textDirection == TextDirection.ltr
|
||||
? EdgeInsets.only(left: padding)
|
||||
: EdgeInsets.only(right: padding);
|
||||
},
|
||||
);
|
||||
return configuration;
|
||||
}
|
||||
|
|
|
@ -287,7 +287,9 @@ class _ToggleListBlockComponentWidgetState
|
|||
}
|
||||
|
||||
return Padding(
|
||||
padding: indentPadding,
|
||||
padding: UniversalPlatform.isMobile
|
||||
? const EdgeInsets.symmetric(horizontal: 26.0)
|
||||
: indentPadding,
|
||||
child: FlowyButton(
|
||||
text: FlowyText(
|
||||
buildPlaceholderText(),
|
||||
|
|
Loading…
Add table
Reference in a new issue