summaryrefslogtreecommitdiff
path: root/vcl/source/app
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-02-03 17:27:02 +0000
committerCaolán McNamara <caolanm@redhat.com>2021-02-04 21:49:22 +0100
commit955fd7d8dc9da29717371c8fcb25d9954ff975bd (patch)
treeb33f36cb8e8161ee490c94d38f7067d7e3c71347 /vcl/source/app
parent948207edfbb6a8bcce2573ec758bacf818bbd2c7 (diff)
split rect arg into dest pos and source rect
Change-Id: I622979fa54e54f1c6e00b5a16546fdbc12957422 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110383 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/source/app')
-rw-r--r--vcl/source/app/salvtables.cxx15
1 files changed, 9 insertions, 6 deletions
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index e9e675e1645b..c1ac2432ff7c 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -1188,7 +1188,7 @@ void DoRecursivePaint(vcl::Window* pWindow, const Point& rPos, OutputDevice& rOu
bool bRVisible = pImpl->mbReallyVisible;
pImpl->mbReallyVisible = pWindow->IsVisible();
- pWindow->Paint(*xOutput, tools::Rectangle(Point(), aSize));
+ pWindow->Paint(*xOutput, tools::Rectangle(Point(), pWindow->PixelToLogic(aSize)));
pImpl->mbReallyVisible = bRVisible;
@@ -1201,19 +1201,22 @@ void DoRecursivePaint(vcl::Window* pWindow, const Point& rPos, OutputDevice& rOu
{
if (!pChild->IsVisible())
continue;
- DoRecursivePaint(pChild, rPos + pChild->GetPosPixel(), rOutput);
+ DoRecursivePaint(pChild, rPos + rOutput.PixelToLogic(pChild->GetPosPixel()), rOutput);
}
}
}
-void SalInstanceWidget::draw(OutputDevice& rOutput, const tools::Rectangle& rRect)
+void SalInstanceWidget::draw(OutputDevice& rOutput, const Point& rPos, const Size& rSizePixel)
{
Size aOrigSize(m_xWidget->GetSizePixel());
+ bool bChangeSize = aOrigSize != rSizePixel;
+ if (bChangeSize)
+ m_xWidget->SetSizePixel(rSizePixel);
- m_xWidget->SetSizePixel(rRect.GetSize());
- DoRecursivePaint(m_xWidget, rRect.TopLeft(), rOutput);
+ DoRecursivePaint(m_xWidget, rPos, rOutput);
- m_xWidget->SetSizePixel(aOrigSize);
+ if (bChangeSize)
+ m_xWidget->SetSizePixel(aOrigSize);
}
namespace