Skip to content

Commit 3afc2d7

Browse files
Akos Kittakittaakos
Akos Kitta
authored andcommitted
Fixed dirty indicator of uncloseable widgets.
Closes #1034. Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
1 parent d404014 commit 3afc2d7

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

Diff for: arduino-ide-extension/src/browser/style/editor.css

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
/* Show the dirty indicator on unclosable widgets. On hover, it should still show the dot instead of the X. */
22
/* https://github.com/arduino/arduino-pro-ide/issues/380 */
3-
.p-TabBar.theia-app-centers .p-TabBar-tab.p-mod-closable.theia-mod-dirty > .p-TabBar-tabCloseIcon:hover {
4-
background-size: 13px;
5-
background-image: var(--theia-icon-circle);
3+
.p-TabBar.theia-app-centers .p-TabBar-tab.p-mod-closable.a-mod-uncloseable.theia-mod-dirty > .p-TabBar-tabCloseIcon:before {
4+
content: "\ea71";
65
}
76

87
.monaco-list-row.show-file-icons.focused {

Diff for: arduino-ide-extension/src/browser/theia/core/widget-manager.ts

+5
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,11 @@ export class WidgetManager extends TheiaWidgetManager {
6666
if (title.closable) {
6767
title.closable = false;
6868
}
69+
// Show the dirty indicator on uncloseable widgets when hovering over the title. Instead of showing the `X` for close.
70+
const uncloseableClass = 'a-mod-uncloseable';
71+
if (!title.className.includes(uncloseableClass)) {
72+
title.className += title.className + ` ${uncloseableClass}`;
73+
}
6974
}
7075

7176
/**

0 commit comments

Comments
 (0)