diff --git a/examples/render/source/main.cpp b/examples/render/source/main.cpp index cbad9258..aa801d4f 100644 --- a/examples/render/source/main.cpp +++ b/examples/render/source/main.cpp @@ -46,11 +46,14 @@ class CustomWindow setTitle ("main"); #if JUCE_WASM - yup::File riveFilePath = yup::File ("/data"); + yup::File riveFilePath = yup::File ("/data") + .getChildFile ("artboard.riv"); #else - yup::File riveFilePath = yup::File (__FILE__).getParentDirectory().getSiblingFile ("data"); + yup::File riveFilePath = yup::File (__FILE__) + .getParentDirectory() + .getSiblingFile ("data") + .getChildFile ("alien.riv"); #endif - riveFilePath = riveFilePath.getChildFile ("artboard.riv"); // Setup artboards for (int i = 0; i < totalRows * totalColumns; ++i) diff --git a/modules/yup_gui/component/yup_Component.cpp b/modules/yup_gui/component/yup_Component.cpp index ba91aaca..6b0408f0 100644 --- a/modules/yup_gui/component/yup_Component.cpp +++ b/modules/yup_gui/component/yup_Component.cpp @@ -148,15 +148,10 @@ void Component::moved() void Component::setSize (const Size& newSize) { + boundsInParent = boundsInParent.withSize (newSize); + if (options.onDesktop) - { native->setSize(newSize.to()); - boundsInParent = Rectangle(0.0f, 0.0f, native->getSize().to()); - } - else - { - boundsInParent = boundsInParent.withSize (newSize); - } resized(); } @@ -189,15 +184,10 @@ float Component::getHeight() const void Component::setBounds (const Rectangle& newBounds) { + boundsInParent = newBounds; + if (options.onDesktop) - { native->setBounds(newBounds.to()); - boundsInParent = native->getBounds().to(); - } - else - { - boundsInParent = newBounds; - } resized(); }