upgrade to JUCE 5.4.3. Remove (probably) unused JUCE modules. Remove VST2 target (it's been end-of-life'd by Steinberg and by JUCE)
This commit is contained in:
@ -37,10 +37,7 @@ Viewport::Viewport (const String& name) : Component (name)
|
||||
|
||||
setInterceptsMouseClicks (false, true);
|
||||
setWantsKeyboardFocus (true);
|
||||
|
||||
#if JUCE_ANDROID || JUCE_IOS
|
||||
setScrollOnDragEnabled (true);
|
||||
#endif
|
||||
setScrollOnDragEnabled (Desktop::getInstance().getMainMouseSource().isTouch());
|
||||
|
||||
recreateScrollbars();
|
||||
}
|
||||
@ -66,7 +63,7 @@ void Viewport::deleteOrRemoveContentComp()
|
||||
{
|
||||
// This sets the content comp to a null pointer before deleting the old one, in case
|
||||
// anything tries to use the old one while it's in mid-deletion..
|
||||
std::unique_ptr<Component> oldCompDeleter (contentComp);
|
||||
std::unique_ptr<Component> oldCompDeleter (contentComp.get());
|
||||
contentComp = nullptr;
|
||||
}
|
||||
else
|
||||
@ -124,7 +121,7 @@ Point<int> Viewport::viewportPosToCompPos (Point<int> pos) const
|
||||
{
|
||||
jassert (contentComp != nullptr);
|
||||
|
||||
auto contentBounds = contentHolder.getLocalArea (contentComp, contentComp->getLocalBounds());
|
||||
auto contentBounds = contentHolder.getLocalArea (contentComp.get(), contentComp->getLocalBounds());
|
||||
|
||||
Point<int> p (jmax (jmin (0, contentHolder.getWidth() - contentBounds.getWidth()), jmin (0, -(pos.x))),
|
||||
jmax (jmin (0, contentHolder.getHeight() - contentBounds.getHeight()), jmin (0, -(pos.y))));
|
||||
@ -214,7 +211,7 @@ struct Viewport::DragToScrollListener : private MouseListener,
|
||||
offsetY.behaviour.setMinimumVelocity (60);
|
||||
}
|
||||
|
||||
~DragToScrollListener()
|
||||
~DragToScrollListener() override
|
||||
{
|
||||
viewport.contentHolder.removeMouseListener (this);
|
||||
Desktop::getInstance().removeGlobalMouseListener (this);
|
||||
@ -398,8 +395,9 @@ void Viewport::updateVisibleArea()
|
||||
}
|
||||
|
||||
Rectangle<int> contentBounds;
|
||||
if (contentComp != nullptr)
|
||||
contentBounds = contentHolder.getLocalArea (contentComp, contentComp->getLocalBounds());
|
||||
|
||||
if (auto cc = contentComp.get())
|
||||
contentBounds = contentHolder.getLocalArea (cc, cc->getLocalBounds());
|
||||
|
||||
auto visibleOrigin = -contentBounds.getPosition();
|
||||
|
||||
|
Reference in New Issue
Block a user