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:
parent
217e7ab444
commit
cfbe853f69
7 changed files with 59 additions and 55 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue