Fix file tree node padding

This commit is contained in:
2024-06-29 08:37:15 +09:30
parent 1da29178a8
commit 3606c360b4
2 changed files with 12 additions and 8 deletions

View File

@@ -2,19 +2,19 @@
<mat-tree-node <mat-tree-node
*matTreeNodeDef="let node" *matTreeNodeDef="let node"
matTreeNodePadding matTreeNodePadding
matTreeNodePaddingIndent="24px" matTreeNodePaddingIndent="12px"
(click)="fileSelected.emit(node.file)" (click)="fileSelected.emit(node.file)"
> >
<button mat-icon-button disabled></button> <button mat-icon-button disabled></button>
{{ node.file.name }} {{ node.file.name }}
</mat-tree-node> </mat-tree-node>
<mat-tree-node *matTreeNodeDef="let node; when: hasChild" matTreeNodeToggle> <mat-tree-node
<button *matTreeNodeDef="let node; when: hasChild"
mat-icon-button matTreeNodeToggle
matTreeNodePadding matTreeNodePadding
matTreeNodePaddingIndent="24px" matTreeNodePaddingIndent="12px"
[attr.aria-label]="'Toggle ' + node.file.name"
> >
<button mat-icon-button [attr.aria-label]="'Toggle ' + node.file.name">
<mat-icon class="mat-icon-rtl-mirror"> <mat-icon class="mat-icon-rtl-mirror">
@if (treeControl.isExpanded(node)) { expand_more } @else { chevron_right @if (treeControl.isExpanded(node)) { expand_more } @else { chevron_right
} }

View File

@@ -12,3 +12,7 @@
.mat-tree { .mat-tree {
background-color: transparent; background-color: transparent;
} }
.mat-tree-node {
cursor: pointer;
}