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

Projucer: Enforce that Icons instances are created from files

This commit is contained in:
reuk 2025-07-22 12:15:00 +01:00
parent 217e7ab444
commit cfbe853f69
No known key found for this signature in database
7 changed files with 59 additions and 55 deletions

View file

@ -124,19 +124,18 @@ IconParseResults parseIconArguments (juce::ArgumentList&& args)
args.checkMinNumArguments (2);
const auto output = args.arguments.removeAndReturn (0);
const auto popDrawable = [&args]() -> std::unique_ptr<juce::Drawable>
const auto popFile = [&args]() -> juce::File
{
if (args.size() == 0)
return {};
const auto firstArgText = args.arguments.removeAndReturn (0).text;
return juce::Drawable::createFromImageFile (firstArgText);
return args.arguments.removeAndReturn (0).text;
};
auto smallIcon = popDrawable();
auto bigIcon = popDrawable();
const auto smallIcon = popFile();
const auto bigIcon = popFile();
return { { std::move (smallIcon), std::move (bigIcon) }, output.text };
return { juce::build_tools::Icons::fromFilesSmallAndBig (smallIcon, bigIcon), output.text };
}
int writeMacIcon (juce::ArgumentList&& argumentList)