sfx2/source/control/recentdocsviewitem.cxx |    8 ++++----
 sfx2/source/control/recentdocsviewitem.hxx |    2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit f37542a29121ce64a306abb2c7e4d572cf245e35
Author:     Ilmari Lauhakangas <ilmari.lauhakan...@libreoffice.org>
AuthorDate: Fri Oct 4 18:18:07 2024 +0300
Commit:     Andreas Heinisch <andreas.heini...@yahoo.de>
CommitDate: Fri Oct 4 19:48:29 2024 +0200

    Make Start Center pin icon highlight behave as intended
    
    After
    commit 9a37652b79001bf5208841b9221dee851b9b6d0f
    Author: Andreas Heinisch <andreas.heini...@yahoo.de>
    Date:   Wed Sep 6 17:03:26 2023 +0200
    
        tdf#156959 - Remove pinned icons from thumbnail view item
    
        Remove pinned icons from thumbnail view item and pushed it down
        to the recent documents view item. This avoids that the pinned
        icon will be shown in a simple thumbnail view, e.g., in the
        thumbnail view of the side pane in base.
    
        In addition, fixed an error with the number of elements in the
        thumbnail view in the start center when items are pinned, i.e.,
        removed a spurious new line.
    
    ... the pin icon stopped changing its state to highlighted.
    
    I believe my commit makes it work like Andreas intended.
    
    Also fix a typo in a member name to prevent accidents in the future.
    
    Change-Id: I074b1ebb773466d72b9fc381b6f1066d2dbc353e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174493
    Tested-by: Jenkins
    Reviewed-by: Andreas Heinisch <andreas.heini...@yahoo.de>

diff --git a/sfx2/source/control/recentdocsviewitem.cxx 
b/sfx2/source/control/recentdocsviewitem.cxx
index d5ae52e297d8..e557c66fdb77 100644
--- a/sfx2/source/control/recentdocsviewitem.cxx
+++ b/sfx2/source/control/recentdocsviewitem.cxx
@@ -134,7 +134,7 @@ RecentDocsViewItem::RecentDocsViewItem(sfx2::RecentDocsView 
&rView, const OUStri
       m_bPinned(isPinned),
       m_bPinnedIconHighlighted(false),
       m_aPinnedDocumentBitmap(BMP_PIN_DOC),
-      m_aPinnedDocumentBitmapHiglighted(BMP_PIN_DOC_HIGHLIGHTED)
+      m_aPinnedDocumentBitmapHighlighted(BMP_PIN_DOC_HIGHLIGHTED)
 {
     OUString aTitle(rTitle);
     INetURLObject aURLObj(rURL);
@@ -311,7 +311,8 @@ void 
RecentDocsViewItem::Paint(drawinglayer::processor2d::BaseProcessor2D *pProc
         // tdf#38742 - draw pinned icon
         const Point aPinnedIconPos(getPinnedIconArea().TopLeft());
         aSeq.push_back(new DiscreteBitmapPrimitive2D(
-            m_aPinnedDocumentBitmap, B2DPoint(aPinnedIconPos.X(), 
aPinnedIconPos.Y())));
+            m_bPinnedIconHighlighted ? m_aPinnedDocumentBitmapHighlighted : 
m_aPinnedDocumentBitmap,
+            B2DPoint(aPinnedIconPos.X(), aPinnedIconPos.Y())));
 
         pProcessor->process(aSeq);
     }
@@ -321,8 +322,7 @@ void 
RecentDocsViewItem::Paint(drawinglayer::processor2d::BaseProcessor2D *pProc
         const Point aPinnedIconPos(getPinnedIconArea().TopLeft());
         drawinglayer::primitive2d::Primitive2DContainer aSeq {
             new DiscreteBitmapPrimitive2D(
-                m_bPinnedIconHighlighted ? m_aPinnedDocumentBitmapHiglighted : 
m_aPinnedDocumentBitmap,
-                B2DPoint(aPinnedIconPos.X(), aPinnedIconPos.Y())) };
+                m_aPinnedDocumentBitmap, B2DPoint(aPinnedIconPos.X(), 
aPinnedIconPos.Y())) };
 
         pProcessor->process(aSeq);
     }
diff --git a/sfx2/source/control/recentdocsviewitem.hxx 
b/sfx2/source/control/recentdocsviewitem.hxx
index 9fd1b760b08f..3c5a5a6973f3 100644
--- a/sfx2/source/control/recentdocsviewitem.hxx
+++ b/sfx2/source/control/recentdocsviewitem.hxx
@@ -68,7 +68,7 @@ private:
     bool m_bPinned;
     bool m_bPinnedIconHighlighted;
     BitmapEx m_aPinnedDocumentBitmap;
-    BitmapEx m_aPinnedDocumentBitmapHiglighted;
+    BitmapEx m_aPinnedDocumentBitmapHighlighted;
 };
 
 #endif // INCLUDED_SFX2_RECENTDOCSVIEWITEM_HXX

Reply via email to