@@ -72,6 +72,13 @@ const iconEntry = $computed(() => {
72
72
return defaultIcon
73
73
})
74
74
75
+ const iconStyle = $computed (() => {
76
+ if (! iconEntry ) return undefined
77
+ return {
78
+ ' --icon-color' : iconEntry .color ,
79
+ }
80
+ })
81
+
75
82
const title = $computed (() => {
76
83
if (character ?.title ) return character .title
77
84
return tab ? getTerminalTabTitle (tab ) : ' '
@@ -161,17 +168,14 @@ function close() {
161
168
>
162
169
<div class =" tab-overview" >
163
170
<div class =" tab-title" >
164
- <VisualIcon
165
- v-if =" iconEntry"
166
- :name =" iconEntry.name"
167
- class =" tab-icon"
168
- :style =" { color: iconEntry.color }"
169
- />
170
- <template v-else-if =" pane && tab ! .shell " >
171
- <VisualIcon v-if =" tab!.process === tab!.cwd" name =" lucide-folder-open" class =" tab-icon" />
172
- <VisualIcon v-else name =" lucide-file" class =" tab-icon" />
173
- </template >
174
- <VisualIcon v-else name =" lucide-terminal" class =" tab-icon" />
171
+ <span class =" tab-icon" :style =" iconStyle" >
172
+ <VisualIcon v-if =" iconEntry" :name =" iconEntry.name" />
173
+ <template v-else-if =" pane && tab ! .shell " >
174
+ <VisualIcon v-if =" tab!.process === tab!.cwd" name =" lucide-folder-open" />
175
+ <VisualIcon v-else name =" lucide-file" />
176
+ </template >
177
+ <VisualIcon v-else name =" lucide-terminal" />
178
+ </span >
175
179
<form v-if =" isCustomizing" class =" tab-name-form" @submit.prevent =" customize" >
176
180
<input
177
181
ref =" customTitleElement"
@@ -232,12 +236,22 @@ function close() {
232
236
min-width : 0 ;
233
237
}
234
238
.tab-icon {
235
- display : inline-block ;
239
+ --icon-color : rgb (var (--system-accent ));
240
+ --icon-color-alt : white ;
241
+ display : flex ;
236
242
flex : none ;
243
+ justify-content : center ;
244
+ align-items : center ;
245
+ height : 1em ;
237
246
margin-right : 6px ;
238
- color : rgb (var (--system-accent ));
247
+ padding : 3px ;
248
+ color : var (--icon-color-alt );
249
+ font-size : 12px ;
250
+ background : var (--icon-color );
251
+ border-radius : 4px ;
239
252
.tab-item.virtual & {
240
- color : rgb (var (--theme-foreground ) / 50% );
253
+ color : var (--icon-color );
254
+ background : color-mix (in oklab , var (--icon-color ) 16.6667% , transparent );
241
255
}
242
256
}
243
257
.tab-name {
0 commit comments