diff options
| author | Crystalwarrior <varsash@gmail.com> | 2021-04-23 16:12:35 +0300 |
|---|---|---|
| committer | Crystalwarrior <varsash@gmail.com> | 2021-04-23 16:12:35 +0300 |
| commit | de4115e20ab800e7ebd639cd37de6df0cd7c72f9 (patch) | |
| tree | ca681bc94843767afdec4a0c21af8e294e8a707e /src/aolayer.cpp | |
| parent | 43340e88695b2adc7b8fc8141540178727fd8869 (diff) | |
| parent | 5fca08537b6f2c6c581156c4dc07bc9ba61b17ef (diff) | |
Merge branch 'master' into crystalwarrior/demo-reload
Diffstat (limited to 'src/aolayer.cpp')
| -rw-r--r-- | src/aolayer.cpp | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/src/aolayer.cpp b/src/aolayer.cpp index 18213ce1..795274f5 100644 --- a/src/aolayer.cpp +++ b/src/aolayer.cpp @@ -98,9 +98,10 @@ void AOLayer::center_pixmap(QPixmap f_pixmap) { x + (f_w - f_pixmap.width()) / 2, y + (f_h - f_pixmap.height())); // Always center horizontally, always put // at the bottom vertically - this->setMask( - QRegion((f_pixmap.width() - f_w) / 2, (f_pixmap.height() - f_h) / 2, f_w, - f_h)); // make sure we don't escape the area we've been given + if (masked) + this->setMask( + QRegion((f_pixmap.width() - f_w) / 2, (f_pixmap.height() - f_h) / 2, f_w, + f_h)); // make sure we don't escape the area we've been given } void AOLayer::combo_resize(int w, int h) @@ -196,20 +197,20 @@ void CharLayer::load_image(QString p_filename, QString p_charname, << " continuous: " << continuous; #endif QStringList pathlist = { - ao_app->get_image_suffix(ao_app->get_character_path( - p_charname, prefix + current_emote)), // Default path - ao_app->get_image_suffix(ao_app->get_character_path( + ao_app->get_character_path( + p_charname, prefix + current_emote), // Default path + ao_app->get_character_path( p_charname, - prefix + "/" + current_emote)), // Path check if it's categorized + prefix + "/" + current_emote), // Path check if it's categorized // into a folder - ao_app->get_image_suffix(ao_app->get_character_path( + ao_app->get_character_path( p_charname, - current_emote)), // Just use the non-prefixed image, animated or not - ao_app->get_image_suffix( - ao_app->get_theme_path("placeholder")), // Theme placeholder path - ao_app->get_image_suffix(ao_app->get_theme_path( - "placeholder", ao_app->default_theme))}; // Default theme placeholder path - start_playback(find_image(pathlist)); + current_emote), // Just use the non-prefixed image, animated or not + current_emote, // The path by itself after the above fail + ao_app->get_theme_path("placeholder"), // Theme placeholder path + ao_app->get_theme_path( + "placeholder", ao_app->default_theme)}; // Default theme placeholder path + start_playback(ao_app->get_image_path(pathlist)); } void SplashLayer::load_image(QString p_filename, QString p_charname, |
