aboutsummaryrefslogtreecommitdiff
path: root/src/aoimage.cpp
diff options
context:
space:
mode:
authoroldmud0 <oldmud0@users.noreply.github.com>2021-12-18 22:34:04 -0600
committeroldmud0 <oldmud0@users.noreply.github.com>2021-12-18 22:34:04 -0600
commitb0e9f8dbe57df5e688d9583987d7e378eebd72b4 (patch)
tree18824b6a05fddfa71e4c1240023fc916d8ef4790 /src/aoimage.cpp
parentcf12168ebd426d7658d7f7021c47be519caa215a (diff)
parent641cca65044e41e49e5a871f0d60138b61c1bab3 (diff)
Merge branch 'master' into feature/http-ms
Diffstat (limited to 'src/aoimage.cpp')
-rw-r--r--src/aoimage.cpp17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/aoimage.cpp b/src/aoimage.cpp
index 656528e..82e17b9 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);