aboutsummaryrefslogtreecommitdiff
path: root/aoscene.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'aoscene.cpp')
-rw-r--r--aoscene.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/aoscene.cpp b/aoscene.cpp
index d910a3e..1d76aed 100644
--- a/aoscene.cpp
+++ b/aoscene.cpp
@@ -14,8 +14,15 @@ void AOScene::set_image(QString p_image)
QString background_path = m_courtroom->get_background_path() + p_image;
QString default_path = m_courtroom->get_default_background_path() + p_image;
+ QPixmap background(background_path);
+ QPixmap default_bg(default_path);
+
+ int w = this->width();
+ int h = this->height();
+
+
if (file_exists(background_path))
- this->setPixmap(background_path);
+ this->setPixmap(background.scaled(w, h));
else
- this->setPixmap(default_path);
+ this->setPixmap(default_bg.scaled(w, h));
}