🐛 fix(vscode): 调用树弹框路径太长时不再挤乱标题、溢出卡片:文件名在前、目录淡色省略

This commit is contained in:
cruldra committed 2026-10-13 10:54:16 +11:00
1 parent 4d29b6aab8
commit 6cf053dcd0
3 files changed
+119 -19

No files matched your search

+58 -10
View File
@@ -1312,7 +1312,7 @@ del.cr-diff-word {
.cr-call-dialog {
display: flex;
flex-direction: column;
width: min(640px, 100%);
width: min(880px, 100%);
max-height: 100%;
overflow: hidden;
border: 1px solid var(--vscode-editorWidget-border, var(--vscode-widget-border, transparent));
@@ -1321,23 +1321,56 @@ del.cr-diff-word {
color: var(--vscode-editorWidget-foreground, var(--vscode-foreground));
box-shadow: 0 8px 28px var(--vscode-widget-shadow);
}
/* 标题一行:「调用树」和符号名整个留着,位置占剩下的宽度 */
.cr-call-title {
display: flex;
flex-shrink: 0;
align-items: center;
gap: 8px;
height: 44px;
padding: 0 14px;
min-height: 44px;
padding: 8px 14px;
border-bottom: 1px solid var(--vscode-widget-border, var(--vscode-panel-border, transparent));
}
.cr-call-heading {
flex-shrink: 0;
font-weight: 600;
white-space: nowrap;
}
.cr-call-symbol,
.cr-call-name {
color: var(--kind);
font-family: var(--vscode-editor-font-family, monospace);
font-weight: 600;
white-space: nowrap;
}
.cr-call-symbol {
flex-shrink: 0;
}
/* 位置:文件名先放全,目录拿剩下的宽度、放不下末尾省略;文件名自己也放不下时才省略 */
.cr-call-where {
display: flex;
flex: 1;
align-items: baseline;
gap: 8px;
min-width: 0;
font-family: var(--vscode-editor-font-family, monospace);
font-size: 11px;
}
.cr-call-file,
.cr-call-dir {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.cr-call-file {
flex: 0 1 auto;
min-width: 0;
color: var(--vscode-foreground);
}
.cr-call-dir {
flex: 1 1 0;
min-width: 0;
color: var(--vscode-disabledForeground, var(--vscode-descriptionForeground));
}
.cr-call-loc {
color: var(--vscode-disabledForeground, var(--vscode-descriptionForeground));
@@ -1349,6 +1382,7 @@ del.cr-diff-word {
align-items: center;
justify-content: center;
width: 24px;
flex-shrink: 0;
height: 24px;
margin-left: auto;
border: 0;
@@ -1447,19 +1481,33 @@ del.cr-diff-word {
border-color: var(--kind);
background: color-mix(in srgb, var(--kind) 14%, transparent);
}
.cr-call-line,
.cr-call-sub {
/* 卡片第一行:图标、名字、detail 占名字后面剩下的宽度,「当前」靠右;第二行只放位置 */
.cr-call-line {
display: flex;
align-items: center;
gap: 8px;
}
.cr-call-line {
color: var(--kind);
}
.cr-call-sub {
margin-top: 2px;
.cr-call-line > svg {
flex-shrink: 0;
}
.cr-call-name {
overflow: hidden;
flex: 0 1 auto;
min-width: 0;
text-overflow: ellipsis;
}
.cr-call-detail {
overflow: hidden;
flex: 1 1 0;
min-width: 0;
color: var(--vscode-descriptionForeground);
font-size: 12px;
font-size: 11px;
white-space: nowrap;
text-overflow: ellipsis;
}
.cr-call-card .cr-call-where {
margin-top: 2px;
}
.cr-call-pill {
display: flex;