mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-05-24 22:06:37 +00:00
16 lines
536 B
TypeScript
16 lines
536 B
TypeScript
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;
|
|
}
|
|
|
|
}
|