1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Fixed a bug on Android where dragging a window around would erroneously increase its size.

This commit is contained in:
Timur Doumler 2016-02-02 14:39:48 +00:00
parent 26759d5f64
commit c5488e2f09

View file

@ -200,7 +200,7 @@ public:
void setBounds (const Rectangle<int>& userRect, bool isNowFullScreen) override
{
Rectangle<int> r = userRect * scale;
Rectangle<int> r = (userRect.toFloat() * scale).toNearestInt();
if (MessageManager::getInstance()->isThisTheMessageThread())
{
@ -232,10 +232,10 @@ public:
Rectangle<int> getBounds() const override
{
return Rectangle<int> (view.callIntMethod (ComponentPeerView.getLeft),
view.callIntMethod (ComponentPeerView.getTop),
view.callIntMethod (ComponentPeerView.getWidth),
view.callIntMethod (ComponentPeerView.getHeight)) / scale;
return (Rectangle<float> (view.callIntMethod (ComponentPeerView.getLeft),
view.callIntMethod (ComponentPeerView.getTop),
view.callIntMethod (ComponentPeerView.getWidth),
view.callIntMethod (ComponentPeerView.getHeight)) / scale).toNearestInt();
}
void handleScreenSizeChange() override