aboutsummaryrefslogtreecommitdiff
path: root/src/aocharmovie.cpp
diff options
context:
space:
mode:
authorCrystalwarrior <varsash@gmail.com>2019-10-06 13:27:11 +0300
committerCrystalwarrior <varsash@gmail.com>2019-10-06 13:27:11 +0300
commit85f33e13c70a523df6554f0983e84777266563e4 (patch)
treec43d418b389fac41c8e42769ec7c8354e4c8a741 /src/aocharmovie.cpp
parent8ab5a3a6b27376fb7e417ce760cbd7bf827a1138 (diff)
Fix some edge cases where the AOChar qlabel is moved around in weird ways (reload theme still puts qlabel at 0,0 without centering)
Fix a full message of speed 0 not properly displaying itself
Diffstat (limited to 'src/aocharmovie.cpp')
-rw-r--r--src/aocharmovie.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/aocharmovie.cpp b/src/aocharmovie.cpp
index f8dc8d2b..b05d7f64 100644
--- a/src/aocharmovie.cpp
+++ b/src/aocharmovie.cpp
@@ -240,7 +240,6 @@ QPixmap AOCharMovie::get_pixmap(QImage image)
f_pixmap = f_pixmap.scaledToHeight(f_h, transform_mode);
this->resize(f_pixmap.size());
- QLabel::move(x + (f_w - f_pixmap.width())/2, y + (f_h - f_pixmap.height())); //Always center horizontally, always put at the bottom vertically
return f_pixmap;
}
@@ -248,7 +247,7 @@ QPixmap AOCharMovie::get_pixmap(QImage image)
void AOCharMovie::set_frame(QPixmap f_pixmap)
{
this->setPixmap(f_pixmap);
- QLabel::move(x + (this->width() - this->pixmap()->width())/2, y);
+ QLabel::move(x + (f_w - f_pixmap.width())/2, y + (f_h - f_pixmap.height())); //Always center horizontally, always put at the bottom vertically
}
void AOCharMovie::combo_resize(int w, int h)