vcl/source/treelist/iconview.cxx |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit d2e9d411f54a4fc300f9fbf43daed4175776acce
Author:     Maya Stephens <[email protected]>
AuthorDate: Fri Dec 19 15:23:04 2025 +0000
Commit:     Michael Stahl <[email protected]>
CommitDate: Thu Jan 8 17:42:15 2026 +0100

    Add size info to icons with ondemand rendering
    
    For icons with on demand rendering, send the image width and height to
    make the placeholder image the correct size.
    
    Change-Id: Ib47e297dca830c153c0c1ac0e130d2c26a6a6964
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196571
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Michael Stahl <[email protected]>

diff --git a/vcl/source/treelist/iconview.cxx b/vcl/source/treelist/iconview.cxx
index 8844cb087c9f..b7881f9f8f34 100644
--- a/vcl/source/treelist/iconview.cxx
+++ b/vcl/source/treelist/iconview.cxx
@@ -324,8 +324,13 @@ void IconView::DumpEntryAndSiblings(tools::JsonWriter& 
rJsonWriter, SvTreeListEn
         if (pIt)
         {
             const SvLBoxContextBmp* pBmpItem = static_cast<const 
SvLBoxContextBmp*>(pIt);
+            Size i = pBmpItem->GetBitmap1().GetSizePixel();
             if (pBmpItem)
+            {
                 rJsonWriter.put("ondemand", true);
+                rJsonWriter.put("width", i.getWidth());
+                rJsonWriter.put("height", i.getHeight());
+            }
         }
 
         if (const OUString tooltip = GetEntryTooltip(pEntry); 
!tooltip.isEmpty())

Reply via email to