pull/1/head
Francois Andriot 12 years ago committed by Timothy Pearson
parent 7a6d1b1ae2
commit a102c3bb80

@ -6,7 +6,7 @@ SUBDIRS = . mplayerthumbsconfig
kde_module_LTLIBRARIES = videopreview.la
videopreview_la_SOURCES = videopreview.cpp mplayerthumbs.kcfgc
videopreview_la_LDFLAGS = -avoid-version -module $(all_libraries) $(TDE_PLUGIN)
videopreview_la_LDFLAGS = -avoid-version -module $(all_libraries) $(TDE_PLUGIN) $(LIB_QT)
protocoldir = $(kde_servicesdir)
@ -14,9 +14,9 @@ messages: rc.cpp
$(EXTRACTRC) `find . -name \*.ui -o -name \*.rc` > rc.cpp
$(XGETTEXT) *.cpp -o $(podir)/videopreview.pot
protocol_DATA = videopreview.desktop
videopreview_la_LIBADD = $(LIB_TDECORE)
videopreview_la_LIBADD = $(LIB_TDECORE) -ltdefx
videothumbnail_DATA = sprocket-small.png sprocket-medium.png sprocket-large.png
videothumbnaildir = $(kde_datadir)/videothumbnail
videothumbnaildir = $(kde_datadir)/videopreview
kde_kcfg_DATA = mplayerthumbs.kcfg

@ -39,6 +39,8 @@
#include <math.h>
#include <ntqfileinfo.h>
#include <cstdlib>
#include "mplayerthumbs.h"
#include "config.h"
@ -160,11 +162,11 @@ bool VideoPreview::create(const TQString &path, int width, int height, TQImage &
TQPixmap sprocket;
if (pix.height() < 60)
sprocket = TQPixmap(locate( "data", "videothumbnail/sprocket-small.png" ));
sprocket = TQPixmap(locate( "data", "videopreview/sprocket-small.png" ));
else if (pix.height() < 90)
sprocket = TQPixmap(locate( "data", "videothumbnail/sprocket-medium.png" ));
sprocket = TQPixmap(locate( "data", "videopreview/sprocket-medium.png" ));
else
sprocket = TQPixmap(locate( "data", "videothumbnail/sprocket-large.png" ));
sprocket = TQPixmap(locate( "data", "videopreview/sprocket-large.png" ));
for (int y = 0; y < pix.height() + sprocket.height(); y += sprocket.height()) {
painter.drawPixmap( 0, y, sprocket );

Loading…
Cancel
Save