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

@@ -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}`;
}
}
/**