1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-09 23:34:20 +00:00

Projucer: Remove separate getters for big and small icons from Project

This commit is contained in:
reuk 2025-07-22 11:46:13 +01:00
parent 36d07a6ce3
commit 217e7ab444
No known key found for this signature in database
3 changed files with 9 additions and 11 deletions

View file

@ -1827,9 +1827,9 @@ private:
if (! app->hasAttribute ("android:icon"))
{
std::unique_ptr<Drawable> bigIcon (getBigIcon()), smallIcon (getSmallIcon());
const auto icons = getIcons();
if (bigIcon != nullptr || smallIcon != nullptr)
if (icons.big != nullptr || icons.small != nullptr)
app->setAttribute ("android:icon", "@drawable/icon");
}

View file

@ -867,14 +867,14 @@ void ProjectExporter::createDefaultConfigs()
}
}
std::unique_ptr<Drawable> ProjectExporter::getBigIcon() const
build_tools::Icons ProjectExporter::getIcons() const
{
return project.getMainGroup().findItemWithID (settings [Ids::bigIcon]).loadAsImageFile();
}
const auto loadIcon = [this] (auto id)
{
return project.getMainGroup().findItemWithID (settings[id]).loadAsImageFile();
};
std::unique_ptr<Drawable> ProjectExporter::getSmallIcon() const
{
return project.getMainGroup().findItemWithID (settings [Ids::smallIcon]).loadAsImageFile();
return { loadIcon (Ids::smallIcon), loadIcon (Ids::bigIcon) };
}
//==============================================================================

View file

@ -238,9 +238,7 @@ public:
void addProjectPathToBuildPathList (StringArray&, const build_tools::RelativePath&, int index = -1) const;
std::unique_ptr<Drawable> getBigIcon() const;
std::unique_ptr<Drawable> getSmallIcon() const;
build_tools::Icons getIcons() const { return { getSmallIcon(), getBigIcon() }; }
build_tools::Icons getIcons() const;
String getExporterIdentifierMacro() const
{