mono / monodevelop

MonoDevelop is a cross platform .NET IDE
http://www.monodevelop.com
2.84k stars 1.02k forks source link

[Ide] Dynamically add ~contrast~dark~sel resource mappings #9590

Closed sevoku closed 4 years ago

sevoku commented 4 years ago

to avoid adding duplicate EmbeddedResource entries to project files.

Background:

To support loading the correct icons in selected state with dark theme and high contrast mode, we'd need to add duplicate resources entries to all csproj file like this:

     <EmbeddedResource Include="icons\project-32~dark~sel.png" />
+    <EmbeddedResource Include="icons\project-32~dark~sel.png" >
+      <LogicalName>project-32~contrast~dark~sel.png</LogicalName>
+    </EmbeddedResource>
     <EmbeddedResource Include="icons\project-32~dark~sel%402x.png" />
+    <EmbeddedResource Include="icons\project-32~dark~sel%402x.png" >
+      <LogicalName>project-32~contrast~dark~sel@2x.png</LogicalName>
+    </EmbeddedResource>

this could be automated, but would be hard to maintain afterwards (it's already quite hard with all icons we have). With this change we don't need any duplicates.