Skip to content

Commit

Permalink
fix: fix visual issues in treeview
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Dej <[email protected]>
  • Loading branch information
meteyou committed Sep 7, 2024
1 parent 4f034b2 commit dc23fec
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions src/components/TheEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,20 +61,22 @@
:name="filename"
:file-extension="fileExtension"
@lineChange="lineChanges" />
<div
v-if="fileStructureSidebar"
class="d-none d-md-flex cursor-pointer cm-editor ͼo structure-sidebar">
<div v-if="fileStructureSidebar" class="d-none d-md-flex structure-sidebar">
<v-treeview
activatable
dense
dark
:active="structureActive"
:open="structureOpen"
item-key="line"
:items="configFileStructure"
class="w-100"
@update:active="activeChanges">
<template #label="{ item }">
<div :class="item.type == 'item' ? 'ͼp' : 'ͼt'">{{ item.name }}</div>
<div
class="cursor-pointer _structure-sicebar-item"
:class="item.type == 'item' ? 'ͼp' : 'ͼt'">
{{ item.name }}
</div>
</template>
<template v-if="restartServiceName === 'klipper'" #append="{ item }">
<v-btn
Expand Down Expand Up @@ -510,4 +512,13 @@ export default class TheEditor extends Mixins(BaseMixin) {
width: 300px;
overflow-y: auto;
}
._structure-sicebar-item {
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
::v-deep .v-treeview-node__level + .v-treeview-node__level {
width: 12px;
}
</style>

0 comments on commit dc23fec

Please sign in to comment.