Completely agree. I would also like to see this.
At the moment, based on my interpretation of how Jon has implemented the “dirty” state trigger, it appears to be a property of the tab_control, rather than something more abstract, like the file itself.
When determining whether or not to trigger the dirty file icon in place of the close button, the theme does more or less the following check: “For this close button, if the parent tab element’s dirty attribute is true, display the dirty file icon”
The actual theme rules are:
// Tab dirty button
{
"class": "tab_close_button",
"settings": "highlight_modified_tabs"],
"parents": {"class": "tab_control", "attributes": "dirty"]}],
"content_margin": [8, 8],
"layer0.texture": "Theme - Soda/Soda Light/tab-dirty.png",
"layer0.opacity": 1.0,
"layer1.opacity": 0.0
},
You can see the check there with: “parents”: {“class”: “tab_control”, “attributes”: “dirty”]}],
I’m not aware at the moment of a way to leverage that for the sidebar tree without Jon adding some other form of indicator for determining if a file is clean / dirty.
I’d certainly use it, if there’s a trigger available or one was added.