The documentation says:
A subclass of the viewport can be created which will receive calls to its visibleAreaChanged() method when the subcomponent changes position or size.
But it seems that when a subcomponent is bigger than the visible area and changes to another size, still bigger, that the callback visibleAreaChanged() is not called.
It looks like this code in juce_Viewport.cpp is responsible for that because it uses the jmin macro:
const Rectangle<int> visibleArea (visibleOrigin.x, visibleOrigin.y, jmin (contentBounds.getWidth() - visibleOrigin.x, contentArea.getWidth()), jmin (contentBounds.getHeight() - visibleOrigin.y, contentArea.getHeight())); if (lastVisibleArea != visibleArea) { lastVisibleArea = visibleArea; visibleAreaChanged (visibleArea); }
Is this intentional? I expected to receive the callback on all size changes of the subcomponent.