Browse Source

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

tags/2021-05-28
tpoole 8 years ago
parent
commit
8567338705
1 changed files with 15 additions and 2 deletions
  1. +15
    -2
      extras/Projucer/Source/Project/jucer_ConfigTree_Modules.h

+ 15
- 2
extras/Projucer/Source/Project/jucer_ConfigTree_Modules.h 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
{


Loading…
Cancel
Save