DocumentWindow & LookAndFeel


#1

Hi Jules,

I just realized, that the DocumentWindow class has a paint() method, which does not fully rely on LookAndFeel classes. That makes it hard to customize.

I am thinking especially aobut the following part:

    if (resizableBorder == nullptr)
    {
        RectangleList<int> border (getLocalBounds());
        border.subtract (getBorderThickness().subtractedFrom (getLocalBounds()));

        g.setColour (getBackgroundColour().overlaidWith (Colour (0x80000000)));
        g.fillRectList (border);
    }


Here a hardcoded colour is used for the border, and no way to change that. (At least none I can see)

Could you modify that paint method, so it can be customized by LookAndFeel?


#2

Yes, good request, will add sort something out for that!


#3

..actually, on looking at it, I can't see why that block of code was there.. I'll remove it!

If you need to draw a custom border, there's already a method drawResizableWindowBorder that you can use to do it.


#4

Thanks, sounds great! :-)