Browse Source

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

tags/2021-05-28
Timur Doumler 10 years ago
parent
commit
c5488e2f09
1 changed files with 5 additions and 5 deletions
  1. +5
    -5
      modules/juce_gui_basics/native/juce_android_Windowing.cpp

+ 5
- 5
modules/juce_gui_basics/native/juce_android_Windowing.cpp 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


Loading…
Cancel
Save