Style file tree sidebar

This commit is contained in:
2024-06-28 22:07:07 +09:30
parent 58c92fb6a9
commit 1da29178a8
4 changed files with 18 additions and 3 deletions

View File

@@ -16,7 +16,8 @@ mat-sidenav-container {
height: 100%;
}
.mat-sidenav.mat-drawer-end {
.mat-sidenav.mat-drawer-end,
.mat-sidenav {
padding: var(--mat-sidenav-container-shape);
}

View File

@@ -2,6 +2,7 @@
<mat-tree-node
*matTreeNodeDef="let node"
matTreeNodePadding
matTreeNodePaddingIndent="24px"
(click)="fileSelected.emit(node.file)"
>
<button mat-icon-button disabled></button>
@@ -11,6 +12,7 @@
<button
mat-icon-button
matTreeNodePadding
matTreeNodePaddingIndent="24px"
[attr.aria-label]="'Toggle ' + node.file.name"
>
<mat-icon class="mat-icon-rtl-mirror">

View File

@@ -1,3 +1,14 @@
:host {
display: block;
border-radius: var(--mat-sidenav-container-shape);
padding: var(--mat-sidenav-container-shape);
height: 100%;
box-sizing: border-box;
transition: background-color 100ms linear;
overflow-x: hidden;
overflow-y: auto;
}
.mat-tree {
background-color: transparent;
}

View File

@@ -8,7 +8,8 @@
background-color: mat.get-theme-color($theme, tertiary-container);
}
app-proto-definition-selector {
app-proto-definition-selector,
app-file-tree {
background-color: mat.get-theme-color($theme, secondary-container);
transition: background-color 100ms linear;
}
@@ -36,7 +37,7 @@ body {
}
body {
margin: 0;
font-family: "Roboto";
font: mat.get-theme-typography(theme.$rose-theme, body-medium, font);
--mat-tree-node-min-height: 24px;
--mat-tree-node-text-size: 14px;
--mdc-icon-button-state-layer-size: 24px;