From e610847df369f02681603e34092fe7d39b749729 Mon Sep 17 00:00:00 2001 From: Ilmari Lauhakangas Date: Sun, 22 Sep 2024 20:37:19 +0300 Subject: tdf#163086 Resize SVG pin icons to 24x24 and clean them up This also reverts commit 13a42d5c2d433da6c2c69159bfc6df0e37643333 which worked around the issue of oversized SVGs. Sukapura Dark's pin_document.svg was already 24x24, gets a cleanup anyway. Editing the SVG source, I changed the 64 (and in one case 512) to 24. Then, I opened each one in Inkscape, clicked the lock icon for width and height, input /2.6667 (or 21,3333 in case the viewbox used to be 512) to the end of the existing width and hit Enter to apply. Then in Object - Align and Distribute panel, I set Relative to: Page and centered on vertical and horizontal axes. Finally, I used svgcleaner to clean out all the useless crap in the source. Change-Id: Ic42bd5fce3227f008fe98eed304b1d565cf13651 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173774 Reviewed-by: Patrick Luby Tested-by: Jenkins Reviewed-by: Ilmari Lauhakangas --- sfx2/source/control/recentdocsviewitem.cxx | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'sfx2/source/control') diff --git a/sfx2/source/control/recentdocsviewitem.cxx b/sfx2/source/control/recentdocsviewitem.cxx index f422a2ad40d7..d5ae52e297d8 100644 --- a/sfx2/source/control/recentdocsviewitem.cxx +++ b/sfx2/source/control/recentdocsviewitem.cxx @@ -147,21 +147,6 @@ RecentDocsViewItem::RecentDocsViewItem(sfx2::RecentDocsView &rView, const OUStri if (aTitle.isEmpty()) aTitle = aURLObj.GetLastName(INetURLObject::DecodeMechanism::WithCharset); - // tdf#163086 downscale excessively large pinned document icons - // For some unknown reason to me, some of the SVG icon sets have their - // pinned document icons set to a viewport of 64x64. So downscale such - // icons to more closely match the size of the pinned document icons - // in the PNG icon sets. - const double nMaxWidthAndHeight = 24; - const Size aPinnedBmpSize(m_aPinnedDocumentBitmap.GetSizePixel()); - const double nPinnedBmpMaxWidthAndHeight = std::max(aPinnedBmpSize.Width(), aPinnedBmpSize.Height()); - if (nPinnedBmpMaxWidthAndHeight > nMaxWidthAndHeight) - { - const double fScale = nMaxWidthAndHeight / nPinnedBmpMaxWidthAndHeight; - m_aPinnedDocumentBitmap.Scale(fScale, fScale); - m_aPinnedDocumentBitmapHiglighted.Scale(fScale, fScale); - } - BitmapEx aThumbnail; //fdo#74834: only load thumbnail if the corresponding option is not disabled in the configuration -- cgit