Skip to content

Commit 21ec3bc

Browse files
author
Miguel Solorio
authored
Merge pull request #82274 from microsoft/misolori/dirty-state-icon
Show dirty state icon when workbench.editor.tabCloseButton is off
2 parents da70ad9 + 12e0f42 commit 21ec3bc

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/vs/workbench/browser/parts/editor/media/tabstitlecontrol.css

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
overflow: visible; /* ...but still show the close button on hover, focus and when dirty */
187187
}
188188

189-
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.close-button-off > .tab-close {
189+
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.close-button-off:not(.dirty) > .tab-close {
190190
display: none; /* hide the close action bar when we are configured to hide it */
191191
}
192192

@@ -233,10 +233,11 @@
233233
}
234234

235235
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.close-button-off.dirty:not(.dirty-border-top) {
236-
background-repeat: no-repeat;
237-
background-position-y: center;
238-
background-position-x: calc(100% - 6px); /* to the right of the tab label */
239-
padding-right: 28px; /* make room for dirty indication when we are running without close button */
236+
padding-right: 0; /* remove extra padding when we are running without close button */
237+
}
238+
239+
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.close-button-off > .tab-close {
240+
pointer-events: none; /* don't allow dirty state/close button to be clicked when running without close button */
240241
}
241242

242243
/* Editor Actions */

0 commit comments

Comments
 (0)