vcl/source/gdi/FileDefinitionWidgetDraw.cxx | 10 ++++++++-- vcl/uiconfig/theme_definitions/definition.xml | 11 +++-------- 2 files changed, 11 insertions(+), 10 deletions(-)
New commits: commit e089b75ba2758183e6eb389d4070560c8989c4e4 Author: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> AuthorDate: Sun Mar 10 21:30:28 2019 +0100 Commit: Tomaž Vajngerl <qui...@gmail.com> CommitDate: Mon Mar 11 00:14:35 2019 +0100 widget theme: change color for window background and frame Change-Id: I37f1524db71eea2912ffb65fdd7a00605e6b1d4d Reviewed-on: https://gerrit.libreoffice.org/69017 Reviewed-by: Tomaž Vajngerl <qui...@gmail.com> Tested-by: Tomaž Vajngerl <qui...@gmail.com> diff --git a/vcl/uiconfig/theme_definitions/definition.xml b/vcl/uiconfig/theme_definitions/definition.xml index 23a19de392d5..46346286756c 100644 --- a/vcl/uiconfig/theme_definitions/definition.xml +++ b/vcl/uiconfig/theme_definitions/definition.xml @@ -366,25 +366,20 @@ <windowbackground> <part value="BackgroundWindow"> <state> - <rect stroke="#FF0000" fill="#FF0000" stroke-width="1" rx="1" ry="1"/> + <rect stroke="#FFFFFF" fill="#FFFFFF" stroke-width="1" rx="1" ry="1"/> </state> </part> <part value="BackgroundDialog"> <state> - <rect stroke="#0000FF" fill="#FFFFFF" stroke-width="1" rx="1" ry="1"/> + <rect stroke="#FFFFFF" fill="#FFFFFF" stroke-width="1" rx="1" ry="1"/> </state> </part> </windowbackground> <frame> - <part value="Entire"> - <state> - <rect stroke="#00FF00" fill="#00FF00" stroke-width="1" rx="1" ry="1"/> - </state> - </part> <part value="Border"> <state> - <rect stroke="#00FF00" fill="#00FF00" stroke-width="1" rx="1" ry="1"/> + <rect stroke="#FFFFFF" fill="#FFFFFF" stroke-width="1" rx="1" ry="1"/> </state> </part> </frame> commit cbfe46bf79ac89f7cd1916eeaaf5f10164038535 Author: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> AuthorDate: Sun Mar 10 21:29:25 2019 +0100 Commit: Tomaž Vajngerl <qui...@gmail.com> CommitDate: Mon Mar 11 00:14:22 2019 +0100 widget theme: take into account scaling factor for images Change-Id: I65bd71dfd113fae33aee7c2b60b945e065314f80 Reviewed-on: https://gerrit.libreoffice.org/69016 Reviewed-by: Tomaž Vajngerl <qui...@gmail.com> Tested-by: Tomaž Vajngerl <qui...@gmail.com> diff --git a/vcl/source/gdi/FileDefinitionWidgetDraw.cxx b/vcl/source/gdi/FileDefinitionWidgetDraw.cxx index b51d98b2c073..5c0920bca4d6 100644 --- a/vcl/source/gdi/FileDefinitionWidgetDraw.cxx +++ b/vcl/source/gdi/FileDefinitionWidgetDraw.cxx @@ -27,6 +27,7 @@ #include <comphelper/seqstream.hxx> #include <comphelper/processfactory.hxx> +#include <comphelper/lok.hxx> #include <com/sun/star/graphic/SvgTools.hpp> #include <basegfx/DrawCommands.hxx> @@ -336,13 +337,18 @@ void munchDrawCommands(std::vector<std::shared_ptr<DrawCommand>> const& rDrawCom break; case DrawCommandType::IMAGE: { + double nScaleFactor = 1.0; + if (comphelper::LibreOfficeKit::isActive()) + nScaleFactor = comphelper::LibreOfficeKit::getDPIScale(); + auto const& rDrawCommand = static_cast<ImageDrawCommand const&>(*pDrawCommand); SvFileStream aFileStream(rDrawCommand.msSource, StreamMode::READ); BitmapEx aBitmap; - vcl::bitmap::loadFromSvg(aFileStream, "", aBitmap, 1.0); + vcl::bitmap::loadFromSvg(aFileStream, "", aBitmap, nScaleFactor); long nImageWidth = aBitmap.GetSizePixel().Width(); long nImageHeight = aBitmap.GetSizePixel().Height(); - SalTwoRect aTR(0, 0, nImageWidth, nImageHeight, nX, nY, nImageWidth, nImageHeight); + SalTwoRect aTR(0, 0, nImageWidth, nImageHeight, nX, nY, nImageWidth / nScaleFactor, + nImageHeight / nScaleFactor); if (!!aBitmap) { const std::shared_ptr<SalBitmap> pSalBitmap _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits