70 const juce::Rectangle<int>& area,
76 const juce::String& text,
78 const juce::Drawable* ,
79 const juce::Colour* ) {
81 juce::Rectangle<int> r = area.reduced(1);
84 g.setColour(BASE::findColour(juce::PopupMenu::highlightedBackgroundColourId));
87 g.setColour(BASE::findColour(juce::PopupMenu::highlightedTextColourId));
88 }
else if (isTicked) {
89 g.setColour(BASE::findColour(juce::PopupMenu::highlightedBackgroundColourId).withAlpha(0.2f));
92 g.setColour(BASE::findColour(juce::PopupMenu::textColourId));
94 g.setColour(BASE::findColour(juce::PopupMenu::textColourId));
97 juce::Font font(getPopupMenuFont());
99 const float maxFontHeight {area.getHeight() / 1.3f};
101 if (font.getHeight() > maxFontHeight) {
102 font.setHeight(maxFontHeight);
108 g.drawFittedText(text, r, juce::Justification::centredLeft, 1);
virtual void drawPopupMenuItem(juce::Graphics &g, const juce::Rectangle< int > &area, bool isSeparator, bool isActive, bool isHighlighted, bool isTicked, bool hasSubMenu, const juce::String &text, const juce::String &shortcutKeyText, const juce::Drawable *icon, const juce::Colour *textColour) override