diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2019-03-07 14:00:16 +0100 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2019-03-07 21:21:23 +0100 |
commit | 79b9d3875fd454722d723f6c68be390f7eca60df (patch) | |
tree | f4b2a1098f5ff7421c1280bd3f5f5cd2625c01f4 /vcl/source | |
parent | 767dd751b8856419d33937e6444660c1d5218590 (diff) |
widget theme - update scrollbars, draw from svg
Change-Id: I7e7cd05ce516ab24d380bb8b6a264fd45e1d553c
Reviewed-on: https://gerrit.libreoffice.org/68864
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/gdi/FileDefinitionWidgetDraw.cxx | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/vcl/source/gdi/FileDefinitionWidgetDraw.cxx b/vcl/source/gdi/FileDefinitionWidgetDraw.cxx index 33d139e1fc21..0067fed75954 100644 --- a/vcl/source/gdi/FileDefinitionWidgetDraw.cxx +++ b/vcl/source/gdi/FileDefinitionWidgetDraw.cxx @@ -203,9 +203,16 @@ void drawFromDrawCommands(gfx::DrawRoot const& rDrawRoot, SalGraphics& rGraphics aPolyPolygon.transform(basegfx::utils::createTranslateB2DHomMatrix( -aPolyPolygonRange.getMinX(), -aPolyPolygonRange.getMinY())); - aPolyPolygon.transform(basegfx::utils::createScaleB2DHomMatrix( - aFinalRectangle.getWidth() / aPolyPolygonRange.getWidth(), - aFinalRectangle.getHeight() / aPolyPolygonRange.getHeight())); + + double fScaleX = 1.0; + double fScaleY = 1.0; + if (aPolyPolygonRange.getWidth() > 0.0) + fScaleX = aFinalRectangle.getWidth() / aPolyPolygonRange.getWidth(); + if (aPolyPolygonRange.getHeight() > 0.0) + fScaleY = aFinalRectangle.getHeight() / aPolyPolygonRange.getHeight(); + + aPolyPolygon.transform(basegfx::utils::createScaleB2DHomMatrix(fScaleX, fScaleY)); + aPolyPolygon.transform(basegfx::utils::createTranslateB2DHomMatrix( aFinalRectangle.getMinX() - 0.5, aFinalRectangle.getMinY() - 0.5)); @@ -698,6 +705,24 @@ bool FileDefinitionWidgetDraw::getNativeControlRegion( rNativeContentRegion = rBoundingControlRegion; return true; } + break; + case ControlType::Scrollbar: + { + if (ePart == ControlPart::ButtonUp || ePart == ControlPart::ButtonDown + || ePart == ControlPart::ButtonLeft || ePart == ControlPart::ButtonRight) + { + rNativeContentRegion = tools::Rectangle(aLocation, Size(0, 0)); + rNativeBoundingRegion = rNativeContentRegion; + return true; + } + else + { + rNativeBoundingRegion = rBoundingControlRegion; + rNativeContentRegion = rNativeBoundingRegion; + return true; + } + } + break; default: break; |