diff options
Diffstat (limited to 'src/aoimage.cpp')
| -rw-r--r-- | src/aoimage.cpp | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/src/aoimage.cpp b/src/aoimage.cpp index 656528e3..82e17b98 100644 --- a/src/aoimage.cpp +++ b/src/aoimage.cpp @@ -24,21 +24,16 @@ AOImage::AOImage(QWidget *parent, AOApplication *p_ao_app, bool make_static) : Q AOImage::~AOImage() {} -bool AOImage::set_image(QString p_path, QString p_misc) +bool AOImage::set_image(QString p_image, QString p_misc) { - // Check if the user wants animated themes - if (!is_static && ao_app->get_animated_theme()) - // We want an animated image - p_path = ao_app->get_image(p_path, ao_app->current_theme, ao_app->get_subtheme(), ao_app->default_theme, p_misc); - else - // Grab a static variant of the image - p_path = ao_app->get_image_path(ao_app->get_asset_paths(p_path, ao_app->current_theme, ao_app->get_subtheme(), ao_app->default_theme, p_misc), true); + p_image = ao_app->get_image(p_image, ao_app->current_theme, ao_app->get_subtheme(), + ao_app->default_theme, p_misc, "", "", is_static || !ao_app->get_animated_theme()); - if (!file_exists(p_path)) { - qDebug() << "Warning: Image" << p_path << "not found! Can't set!"; + if (!file_exists(p_image)) { + qDebug() << "Warning: Image" << p_image << "not found! Can't set!"; return false; } - path = p_path; + path = p_image; if (!is_static) { movie->stop(); movie->setFileName(path); |
