mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-11-09 10:28:32 +00:00
ATL-667: Show dirty indicator on unclosable widget
Signed-off-by: Akos Kitta <kittaakos@typefox.io>
This commit is contained in:
15
arduino-ide-extension/src/browser/theia/core/tab-bars.ts
Normal file
15
arduino-ide-extension/src/browser/theia/core/tab-bars.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { TabBar } from '@phosphor/widgets';
|
||||
import { Saveable } from '@theia/core/lib/browser/saveable';
|
||||
import { TabBarRenderer as TheiaTabBarRenderer } from '@theia/core/lib/browser/shell/tab-bars';
|
||||
|
||||
export class TabBarRenderer extends TheiaTabBarRenderer {
|
||||
|
||||
createTabClass(data: TabBar.IRenderData<any>): string {
|
||||
let className = super.createTabClass(data);
|
||||
if (!data.title.closable && Saveable.isDirty(data.title.owner)) {
|
||||
className += ' p-mod-closable';
|
||||
}
|
||||
return className;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user