Allow different splash and about image

This commit is contained in:
Chris Hennes
2021-02-08 11:10:41 -06:00
committed by wmayer
parent 24ce12d8f3
commit c039217af1
6 changed files with 34 additions and 1 deletions

View File

@@ -1456,6 +1456,28 @@ void MainWindow::stopSplasher(void)
}
}
QPixmap MainWindow::aboutImage() const
{
// See if we have a custom About screen image set
QPixmap about_image;
std::string about_path = App::Application::Config()["AboutImage"];
if (!about_path.empty()) {
QString path = QString::fromUtf8(about_path.c_str());
if (QDir(path).isRelative()) {
QString home = QString::fromUtf8(App::GetApplication().getHomePath());
path = QFileInfo(QDir(home), path).absoluteFilePath();
}
about_image.load(path);
// Now try the icon paths
if (about_image.isNull()) {
about_image = Gui::BitmapFactory().pixmap(about_path.c_str());
}
}
return about_image;
}
QPixmap MainWindow::splashImage() const
{
// search in the UserAppData dir as very first