# Menu fillAll() request

**URL:** <https://forum.juce.com/t/menu-fillall-request/13231>\
**Category:** General JUCE discussion\
**Created:** [July 23, 2014, 3:09pm UTC](https://forum.juce.com/t/menu-fillall-request/13231 "2014-07-23T15:09:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![AaronLeese](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/aaronleese/32/624_2.png) [@AaronLeese](https://forum.juce.com/u/AaronLeese)\
**Post date:** [July 23, 2014, 3:09pm UTC](https://forum.juce.com/t/menu-fillall-request/13231/1 "2014-07-23T15:09:45Z")

</div>

&nbsp;

Hey Jules -

I was customizing my lookAndFeel class today, getting the menus looking good, and noticed that you have a fillAll(white) in the juce\_popupMenu::paint method before calling the lookAndFeel&nbsp;drawPopupMenuBackground method.

I'd like to have popup menus with rounded corners ... but, of course, the white always bleeds through on the edges currently.

Any chance you might change this to either use a color we can set (maybe&nbsp;PopupMenu::backgroundColor) ... or maybe just eliminate the fillAll?

juce\_PopupMenu.cpp line 293:

```
void paint (Graphics& g) override
 {

        if (isOpaque())

            g.fillAll (Colours::white);

        getLookAndFeel().drawPopupMenuBackground (g, getWidth(), getHeight());

  }
```

&nbsp;

&nbsp;

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [July 23, 2014, 3:39pm UTC](https://forum.juce.com/t/menu-fillall-request/13231/2 "2014-07-23T15:39:35Z")

</div>

Sorry - I'm confused.. You can't draw rounded corners if your window is opaque, and if it's not opaque, then the background won't be filled (?)

---

<div class="post-metadata">

**Author:** ![AaronLeese](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/aaronleese/32/624_2.png) [@AaronLeese](https://forum.juce.com/u/AaronLeese)\
**Post date:** [July 23, 2014, 6:30pm UTC](https://forum.juce.com/t/menu-fillall-request/13231/3 "2014-07-23T18:30:55Z")

</div>

&nbsp;

Aha. &nbsp;Yeah, I thought this was obvious. &nbsp;I customized my lookAndFeel::drawPopupMenuBackground to draw a background with rounded corners. &nbsp;I then noticed the white corners coming through (see image).

&nbsp;

But just now I see that when that component is created (the&nbsp;MenuWindow, in juce\_popupMenu) it sets it's opaqueness based on the&nbsp;PopupMenu::backgroundColourId.

&nbsp;

So ... the simple workaround is to set&nbsp;PopupMenu::backgroundColourId to&nbsp;&nbsp;Colours::transparentBlack ....

then the MenuWindow isn't opaque, and doesn't drop in the white.

&nbsp;

Anyway, that works for me. &nbsp;I do think it strange that you would use white for the background though&nbsp;instead of whatever the&nbsp;PopupMenu::backgroundColourId is set to.

&nbsp;

&nbsp;

&nbsp;

&nbsp; &nbsp;

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [July 24, 2014, 10:50am UTC](https://forum.juce.com/t/menu-fillall-request/13231/4 "2014-07-24T10:50:12Z")

</div>

Yes, to be honest the fillAll is probably unnecessary, it's probably left-over from old code before there was a lookandfeel method to draw it.

---

<div class="post-metadata">

**Author:** ![AaronLeese](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/aaronleese/32/624_2.png) [@AaronLeese](https://forum.juce.com/u/AaronLeese)\
**Post date:** [July 24, 2014, 1:57pm UTC](https://forum.juce.com/t/menu-fillall-request/13231/5 "2014-07-24T13:57:22Z")

</div>

&nbsp;

Right. &nbsp;It may be less confusing to remove it at this point. &nbsp;Always weird when a stange color unexpectedly appears on screen.
