Skip to content

Commit 07052c3

Browse files
committed
Add border radius and padding
1 parent 4b819e1 commit 07052c3

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

lib/widgets/ast_node_tree_view.dart

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,12 @@ class _AstNodeTreeViewState extends State<AstNodeTreeView> {
6161
nodeBuilder: (context, entry) {
6262
final astNode = entry.node.value;
6363
return Ink(
64-
color: widget.selected == astNode ? theme.colorScheme.primaryContainer : null,
64+
decoration: BoxDecoration(
65+
color: widget.selected == astNode ? theme.colorScheme.primaryContainer : null,
66+
borderRadius: const BorderRadius.all(Radius.circular(4.0)),
67+
),
6568
child: InkWell(
69+
borderRadius: const BorderRadius.all(Radius.circular(4.0)),
6670
onTap: () {
6771
widget.onNodeChanged(astNode);
6872
},
@@ -73,9 +77,12 @@ class _AstNodeTreeViewState extends State<AstNodeTreeView> {
7377
indent: 24,
7478
color: theme.dividerColor,
7579
),
76-
child: Text(
77-
getAstNodeTypeName(astNode),
78-
overflow: TextOverflow.ellipsis,
80+
child: Padding(
81+
padding: const EdgeInsets.symmetric(horizontal: 4.0),
82+
child: Text(
83+
getAstNodeTypeName(astNode),
84+
overflow: TextOverflow.ellipsis,
85+
),
7986
),
8087
),
8188
),

0 commit comments

Comments
 (0)