diff --git a/src/modules/packagechooser/PackageModel.cpp b/src/modules/packagechooser/PackageModel.cpp index 4fe914915..8a0b13e51 100644 --- a/src/modules/packagechooser/PackageModel.cpp +++ b/src/modules/packagechooser/PackageModel.cpp @@ -9,13 +9,26 @@ #include "PackageModel.h" +#include "Branding.h" #include "utils/Logger.h" #include "utils/Variant.h" -static QPixmap loadScreenshot( const QString& path ) +#include + +static QPixmap +loadScreenshot( const QString& path ) { - cDebug() << path; - return QPixmap( path ); + if ( QFileInfo::exists( path ) ) + { + return QPixmap( path ); + } + + const auto* branding = Calamares::Branding::instance(); + if ( !branding ) + { + return QPixmap(); + } + return QPixmap( branding->componentDirectory() + QStringLiteral( "/" ) + path ); } PackageItem::PackageItem() {} diff --git a/src/modules/packagechooser/packagechooser.conf b/src/modules/packagechooser/packagechooser.conf index 231826cd3..bb982916e 100644 --- a/src/modules/packagechooser/packagechooser.conf +++ b/src/modules/packagechooser/packagechooser.conf @@ -95,7 +95,11 @@ labels: # Human-readable description. These can be translated as well. # - *screenshot* # Path to a single screenshot of the product. May be a filesystem -# path or a QRC path, e.g. ":/images/no-selection.png". +# path or a QRC path, e.g. ":/images/no-selection.png". If the path +# is not found (e.g. is a non-existent absolute path, or is a relative +# path that does not exist in the current working directory) then +# an additional attempt is made to load the image from the **branding** +# directory. # # The following field is **optional** for an item: #