diff options
Diffstat (limited to 'client/yuv_draw.cc')
-rw-r--r-- | client/yuv_draw.cc | 29 |
1 files changed, 6 insertions, 23 deletions
diff --git a/client/yuv_draw.cc b/client/yuv_draw.cc index 7cc2f4c..a4ffc60 100644 --- a/client/yuv_draw.cc +++ b/client/yuv_draw.cc @@ -27,29 +27,9 @@ #include "yuv_draw.h" #include <string.h> - +#include "icons.h" #define TEXT_MARGIN 10 -#include "mainwindow.h" -static QImage *loadIcon( char *name, int height ) -{ - QImage scaled; - QImage *img; - - img = new QImage(); - img->load( name ); - - int h = height; - int w = (int)((float)img->width() / (float)(img->height() / (float)h)); - - scaled = img->scaled(w, h, Qt::KeepAspectRatio, Qt::SmoothTransformation); - delete img; - img = new QImage(scaled); - - return img; -} - - YUVDraw::YUVDraw() { overlay = NULL; @@ -70,12 +50,15 @@ YUVDraw::YUVDraw() } } - img_muted = loadIcon(PIXMAP_MUTE, ICON_HEIGHT); - img_unmuted = loadIcon(PIXMAP_UNMUTE, ICON_HEIGHT); + img_muted = new QImage(Icons::mute->toImage()); + img_unmuted = new QImage(Icons::unmute->toImage()); } YUVDraw::~YUVDraw() { + delete img_muted; + delete img_unmuted; + delete top_pixmap; delete bottom_pixmap; } |