Fixed dirty indicator of uncloseable widgets.

Closes #1034.

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
This commit is contained in:
Akos Kitta 2022-08-26 09:02:48 +02:00 committed by Akos Kitta
parent d40401437a
commit 3afc2d7e4b
2 changed files with 7 additions and 3 deletions

View File

@ -1,8 +1,7 @@
/* Show the dirty indicator on unclosable widgets. On hover, it should still show the dot instead of the X. */
/* https://github.com/arduino/arduino-pro-ide/issues/380 */
.p-TabBar.theia-app-centers .p-TabBar-tab.p-mod-closable.theia-mod-dirty > .p-TabBar-tabCloseIcon:hover {
background-size: 13px;
background-image: var(--theia-icon-circle);
.p-TabBar.theia-app-centers .p-TabBar-tab.p-mod-closable.a-mod-uncloseable.theia-mod-dirty > .p-TabBar-tabCloseIcon:before {
content: "\ea71";
}
.monaco-list-row.show-file-icons.focused {

View File

@ -66,6 +66,11 @@ export class WidgetManager extends TheiaWidgetManager {
if (title.closable) {
title.closable = false;
}
// Show the dirty indicator on uncloseable widgets when hovering over the title. Instead of showing the `X` for close.
const uncloseableClass = 'a-mod-uncloseable';
if (!title.className.includes(uncloseableClass)) {
title.className += title.className + ` ${uncloseableClass}`;
}
}
/**