diff options
| author | David Skoland <davidskoland@gmail.com> | 2018-11-16 02:01:08 +0100 |
|---|---|---|
| committer | David Skoland <davidskoland@gmail.com> | 2018-11-16 02:01:08 +0100 |
| commit | 8ffdd2afb84ec483160f156d24cf786165a9506c (patch) | |
| tree | 39212e8d648e458188ce49823963fb1c88b70bd2 /aoscene.cpp | |
| parent | 11c2f258ebf48f515cdba5c7ae9cccec447604dd (diff) | |
refactored path functions and added support for case-sensitive filesystems
Diffstat (limited to 'aoscene.cpp')
| -rw-r--r-- | aoscene.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/aoscene.cpp b/aoscene.cpp index 5fe83047..7056bfc0 100644 --- a/aoscene.cpp +++ b/aoscene.cpp @@ -10,9 +10,9 @@ AOScene::AOScene(QWidget *parent, AOApplication *p_ao_app) : QLabel(parent) void AOScene::set_image(QString p_image) { - QString background_path = ao_app->get_background_path() + p_image + ".png"; - QString animated_background_path = ao_app->get_background_path() + p_image + ".gif"; - QString default_path = ao_app->get_default_background_path() + p_image; + QString background_path = ao_app->get_background_path(p_image + ".png"); + QString animated_background_path = ao_app->get_background_path(p_image + ".gif"); + QString default_path = ao_app->get_default_background_path(p_image + ".png"); QPixmap background(background_path); QPixmap animated_background(animated_background_path); @@ -34,8 +34,8 @@ void AOScene::set_legacy_desk(QString p_image) //vanilla desks vary in both width and height. in order to make that work with viewport rescaling, //some INTENSE math is needed. - QString desk_path = ao_app->get_background_path() + p_image; - QString default_path = ao_app->get_default_background_path() + p_image; + QString desk_path = ao_app->get_background_path(p_image); + QString default_path = ao_app->get_default_background_path(p_image); QPixmap f_desk; @@ -53,7 +53,7 @@ void AOScene::set_legacy_desk(QString p_image) //int final_y = y_modifier * vp_height; //int final_w = w_modifier * f_desk.width(); - int final_h = h_modifier * f_desk.height(); + int final_h = static_cast<int>(h_modifier * f_desk.height()); //this->resize(final_w, final_h); //this->setPixmap(f_desk.scaled(final_w, final_h)); |
