def rebuild_phantom(self):
html = '''<body id="tree">
<style>
body {
font-size: 12px;
line-height: 16px;
}
.file a, .dir a {
display: block;
padding-left: 4px;
}
.dir a {
padding-top: 1px;
padding-bottom: 2px;
}
.dir a {
text-decoration: none;
}
.file.active {
background-color: color(var(--background) blend(var(--foreground) 80%));
border-radius: 3px;
}
.file span {
font-size: 7px;
}
.file a {
text-decoration: none;
color: var(--foreground);
}
</style>''' + ''.join(self.render_subtree(self.tree, [])) + '</body>'
self.phantom = sublime.Phantom(sublime.Region(0), html, sublime.LAYOUT_BLOCK, on_navigate=self.on_click)
self.phantom_set.update([self.phantom])
评论列表
文章目录