void ProjucerLookAndFeel::drawPropertyComponentLabel (Graphics& g, int width, int height, PropertyComponent& component)
{
    ignoreUnused (width);

    g.setColour (component.findColour (defaultTextColourId)
                          .withMultipliedAlpha (component.isEnabled() ? 1.0f : 0.6f));

    auto textWidth = getTextWidthForPropertyComponent (&component);

    g.setFont (getPropertyComponentFont());
    g.drawFittedText (component.getName(), 0, 0, textWidth - 5, height, Justification::centredLeft, 5, 1.0f);
}
Beispiel #2
0
void pMixLookAndFeel::drawPropertyComponentLabel (Graphics& g, int width, int height, PropertyComponent& component)
{
  g.setColour (Colours::black);
  
  if (! component.isEnabled())
    g.setOpacity (0.6f);
  
  g.setFont (jmin (height, 24) * 0.65f);
  
  const Rectangle<int> r (getPropertyComponentContentPosition (component));
  
  g.drawText (component.getName(),
              3, r.getY(), r.getX() - 5, r.getHeight(),
              Justification::centredLeft, 2);
}