icon-themes/colibre/res/base_thumbnail_192.png |binary
 icon-themes/colibre/res/base_thumbnail_256.png |binary
 include/sfx2/thumbnailview.hxx                 |    2 ++
 sfx2/inc/bitmaps.hlst                          |    2 ++
 sfx2/source/control/recentdocsview.cxx         |    7 +++++++
 5 files changed, 11 insertions(+)

New commits:
commit db28ff6b4b1af86e1b4f1d817cf7216d5d26f29a
Author:     Heiko Tietze <tietze.he...@gmail.com>
AuthorDate: Thu Feb 25 13:33:38 2021 +0100
Commit:     Heiko Tietze <heiko.tie...@documentfoundation.org>
CommitDate: Sat Feb 27 12:04:16 2021 +0100

    Resolves tdf#139453 - Image for Base in start center
    
    Background image is themable taken from SFX_THUMBNAIL_BASE_192
    and SFX_THUMBNAIL_BASE_256
    
    Change-Id: I0401bbe33ae39d8c8250383f492d0620c845c61e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111534
    Tested-by: Jenkins
    Reviewed-by: Heiko Tietze <heiko.tie...@documentfoundation.org>

diff --git a/icon-themes/colibre/res/base_thumbnail_192.png 
b/icon-themes/colibre/res/base_thumbnail_192.png
new file mode 100644
index 000000000000..660460a85979
Binary files /dev/null and b/icon-themes/colibre/res/base_thumbnail_192.png 
differ
diff --git a/icon-themes/colibre/res/base_thumbnail_256.png 
b/icon-themes/colibre/res/base_thumbnail_256.png
new file mode 100644
index 000000000000..93960add6a97
Binary files /dev/null and b/icon-themes/colibre/res/base_thumbnail_256.png 
differ
diff --git a/include/sfx2/thumbnailview.hxx b/include/sfx2/thumbnailview.hxx
index 6d98d12ea441..c50b7bb91987 100644
--- a/include/sfx2/thumbnailview.hxx
+++ b/include/sfx2/thumbnailview.hxx
@@ -253,6 +253,8 @@ public:
 
     static BitmapEx readThumbnail(const OUString &msURL);
 
+    tools::Long ItemHeight() const { return mnItemHeight; };
+
 protected:
 
     virtual bool KeyInput( const KeyEvent& rKEvt ) override;
diff --git a/sfx2/inc/bitmaps.hlst b/sfx2/inc/bitmaps.hlst
index de8d6555d19d..3c236ff50d64 100644
--- a/sfx2/inc/bitmaps.hlst
+++ b/sfx2/inc/bitmaps.hlst
@@ -74,6 +74,8 @@
 #define SFX_FILE_THUMBNAIL_DATABASE         "res/odb_48_8.png"
 #define SFX_FILE_THUMBNAIL_MATH             "res/odf_48_8.png"
 #define SFX_FILE_THUMBNAIL_DEFAULT          "res/mainapp_48_8.png"
+#define SFX_THUMBNAIL_BASE_192              "res/base_thumbnail_192.png"
+#define SFX_THUMBNAIL_BASE_256              "res/base_thumbnail_256.png"
 
 #define BMP_RECENTDOC_REMOVE                "res/recentdoc_remove.png"
 #define BMP_RECENTDOC_REMOVE_HIGHLIGHTED    
"res/recentdoc_remove_highlighted.png"
diff --git a/sfx2/source/control/recentdocsview.cxx 
b/sfx2/source/control/recentdocsview.cxx
index be9b179d66d4..d137d366837c 100644
--- a/sfx2/source/control/recentdocsview.cxx
+++ b/sfx2/source/control/recentdocsview.cxx
@@ -266,6 +266,13 @@ void RecentDocsView::Reload()
                     SvMemoryStream aStream(aDecoded.getArray(), 
aDecoded.getLength(), StreamMode::READ);
                     vcl::PNGReader aReader(aStream);
                     aThumbnail = aReader.Read();
+                } else
+                {
+                    INetURLObject aUrl(aURL);
+                    if (mnFileTypes & ApplicationType::TYPE_DATABASE && 
typeMatchesExtension(ApplicationType::TYPE_DATABASE, aUrl.getExtension()))
+                    {
+                        aThumbnail = BitmapEx(ThumbnailView::ItemHeight() > 
192 ? SFX_THUMBNAIL_BASE_256 : SFX_THUMBNAIL_BASE_192);
+                    }
                 }
             }
         }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to