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

Introjucer: support for larger OSX icon sizes.

This commit is contained in:
jules 2012-07-16 15:53:09 +01:00
parent 66cd90e4af
commit 74078ee2c8
2 changed files with 23 additions and 1 deletions

View file

@ -367,7 +367,7 @@ private:
static Image fixMacIconImageSize (Image& image)
{
const int validSizes[] = { 16, 32, 48, 128 };
const int validSizes[] = { 16, 32, 48, 128, 256, 512, 1024 };
const int w = image.getWidth();
const int h = image.getHeight();
@ -438,6 +438,23 @@ private:
}
}
}
else
{
if (w == 256) type = "ic08";
if (w == 512) type = "ic09";
if (w == 1024) type = "ic10";
if (type != nullptr)
{
MemoryOutputStream pngData;
PNGImageFormat pngFormat;
pngFormat.writeImageToStream (image, pngData);
data.write (type, 4);
data.writeIntBigEndian (pngData.getDataSize());
data.write (pngData.getData(), pngData.getDataSize());
}
}
}
jassert (data.getDataSize() > 0); // no suitable sized images?

View file

@ -34,6 +34,7 @@ namespace Ids
DECLARE_ID (name);
DECLARE_ID (file);
DECLARE_ID (text);
DECLARE_ID (version);
DECLARE_ID (companyName);
DECLARE_ID (position);
@ -47,6 +48,10 @@ namespace Ids
DECLARE_ID (vstFolder);
DECLARE_ID (rtasFolder);
DECLARE_ID (auFolder);
DECLARE_ID (flags);
DECLARE_ID (line);
DECLARE_ID (index);
DECLARE_ID (type);
DECLARE_ID (extraCompilerFlags);
DECLARE_ID (extraLinkerFlags);
DECLARE_ID (extraDefs);