From d69c390a792ea2b8571999a0e10c06a1dd8ec12f Mon Sep 17 00:00:00 2001 From: Rafael Villar Burke Date: Wed, 25 Nov 2020 16:13:45 +0100 Subject: [PATCH] Reduce appicon size when generating thumbnail This smaller size is less intrusive but still can be recognized, and makes the thumbnail more generally useful. --- src/Gui/Thumbnail.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Gui/Thumbnail.cpp b/src/Gui/Thumbnail.cpp index 58109e8bb5..9d5016e33e 100644 --- a/src/Gui/Thumbnail.cpp +++ b/src/Gui/Thumbnail.cpp @@ -98,7 +98,9 @@ void Thumbnail::SaveDocFile (Base::Writer &writer) const this->viewer->imageFromFramebuffer(this->size, this->size, 0, invalid, img); } - QPixmap px = Gui::BitmapFactory().pixmap(App::Application::Config()["AppIcon"].c_str()); + // Get app icon and resize to half size to insert in topbottom position over the current view snapshot + QPixmap app_icon = Gui::BitmapFactory().pixmap(App::Application::Config()["AppIcon"].c_str()); + QPixmap px = app_icon.scaled(this->size / 4, this->size /4); if (!img.isNull()) { if (App::GetApplication().GetParameterGroupByPath ("User parameter:BaseApp/Preferences/Document")->GetBool("AddThumbnailLogo",true))