diff options
author | Patrick Luby <guibmacdev@gmail.com> | 2024-04-29 09:35:30 -0400 |
---|---|---|
committer | Patrick Luby <guibomacdev@gmail.com> | 2024-04-30 01:24:29 +0200 |
commit | f4ef5435df5560e6b6b061ce4053c71e2819bf51 (patch) | |
tree | b47fe1d04d577a8988d66d29eb53e4af8638a763 /vcl/source/image/ImplImage.cxx | |
parent | af5a1b5925dbc816dced8813282d953fd5adbaaa (diff) |
tdf#130678 draw SVG icons at Retina resolution on macOS
Also, change the default icon theme on macOS to SVG now that SVG icons
support Retina display resolution and the existing PNG icon themes do not.
Change-Id: I8c86c316b0db005661759c132ecf7e8667cf30bd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166867
Reviewed-by: Patrick Luby <guibomacdev@gmail.com>
Tested-by: Jenkins
Diffstat (limited to 'vcl/source/image/ImplImage.cxx')
-rw-r--r-- | vcl/source/image/ImplImage.cxx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/vcl/source/image/ImplImage.cxx b/vcl/source/image/ImplImage.cxx index cf70052a9fd7..f4b1cbba21a4 100644 --- a/vcl/source/image/ImplImage.cxx +++ b/vcl/source/image/ImplImage.cxx @@ -61,13 +61,20 @@ bool ImplImage::loadStockAtScale(SalGraphics* pGraphics, BitmapEx &rBitmapEx) sal_Int32 nScalePercentage = -1; double fScale(1.0); + OUString aIconTheme = Application::GetSettings().GetStyleSettings().DetermineIconTheme(); +#ifdef MACOSX + if (aIconTheme.endsWith("_svg")) + { +#endif if (pGraphics && pGraphics->ShouldDownscaleIconsAtSurface(&fScale)) // scale at the surface { nScalePercentage = fScale * 100.0; eScalingFlags = ImageLoadFlags::IgnoreScalingFactor; } +#ifdef MACOSX + } +#endif - OUString aIconTheme = Application::GetSettings().GetStyleSettings().DetermineIconTheme(); if (!ImageTree::get().loadImage(maStockName, aIconTheme, aBitmapEx, true, nScalePercentage, eScalingFlags)) { |