Browse Source

Introjucer: added a version and build date to the window background logo area.

tags/2021-05-28
jules 10 years ago
parent
commit
3e662da32b
1 changed files with 23 additions and 9 deletions
  1. +23
    -9
      extras/Introjucer/Source/Project/jucer_ProjectContentComponent.cpp

+ 23
- 9
extras/Introjucer/Source/Project/jucer_ProjectContentComponent.cpp View File

@@ -144,20 +144,34 @@ private:
};
//==============================================================================
class LogoComponent : public Component
struct LogoComponent : public Component
{
public:
LogoComponent() {}
void paint (Graphics& g)
{
g.setColour (findColour (mainBackgroundColourId).contrasting (0.3f));
Rectangle<int> r (getLocalBounds());
g.setFont (15.0f);
g.drawFittedText (getVersionInfo(), r.removeFromBottom (30), Justification::centred, 2);
const Path& logo = getIcons().mainJuceLogo;
const AffineTransform trans (RectanglePlacement (RectanglePlacement::centred)
.getTransformToFit (logo.getBounds(),
getLocalBounds().toFloat()));
g.fillPath (logo, RectanglePlacement (RectanglePlacement::centred)
.getTransformToFit (logo.getBounds(), r.toFloat()));
}
g.setColour (findColour (mainBackgroundColourId).contrasting (0.3f));
g.fillPath (logo, trans);
static String getVersionInfo()
{
const Time buildDate (Time::getCompilationDate());
String s;
s << SystemStats::getJUCEVersion() << newLine
<< "Introjucer built: " << buildDate.getDayOfMonth()
<< " " << Time::getMonthName (buildDate.getMonth(), true)
<< " " << buildDate.getYear();
return s;
}
};


Loading…
Cancel
Save