1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-17 00:44:19 +00:00

Changed the colour of module icons in the Projucer based on their license

This commit is contained in:
tpoole 2016-12-14 10:18:35 +00:00
parent 2e84129479
commit 8567338705

View file

@ -37,10 +37,23 @@ public:
String getRenamingName() const override { return getDisplayName(); }
void setName (const String&) override {}
bool isMissing() override { return hasMissingDependencies(); }
Icon getIcon() const override { return Icon (getIcons().jigsaw, getContrastingColour (Colours::red, 0.5f)); }
void showDocument() override { showSettingsPage (new ModuleSettingsPanel (project, moduleID)); }
void deleteItem() override { project.getModules().removeModule (moduleID); }
Icon getIcon() const override
{
auto iconColour = Colours::yellow;
auto info = project.getModules().getModuleInfo (moduleID);
if (info.isValid() && info.getVendor() == "juce")
{
if (info.getLicense() == "ISC")
iconColour = Colours::lightblue;
else if (info.getLicense() == "GPL/Commercial")
iconColour = Colours::orange;
}
return Icon (getIcons().jigsaw, getContrastingColour (iconColour, 0.5f));
}
void showPopupMenu() override
{
PopupMenu menu;
@ -303,7 +316,7 @@ public:
String getDisplayName() const override { return "Modules"; }
void setName (const String&) override {}
bool isMissing() override { return false; }
Icon getIcon() const override { return Icon (getIcons().graph, getContrastingColour (Colours::red, 0.5f)); }
Icon getIcon() const override { return Icon (getIcons().graph, getContrastingColour (Colours::orange, 0.5f)); }
void showDocument() override
{