summaryrefslogtreecommitdiff
path: root/core/multimedia/opieplayer/videowidget.cpp
Unidiff
Diffstat (limited to 'core/multimedia/opieplayer/videowidget.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/multimedia/opieplayer/videowidget.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/multimedia/opieplayer/videowidget.cpp b/core/multimedia/opieplayer/videowidget.cpp
index 2396ed5..c545511 100644
--- a/core/multimedia/opieplayer/videowidget.cpp
+++ b/core/multimedia/opieplayer/videowidget.cpp
@@ -77,49 +77,49 @@ VideoWidget::VideoWidget(QWidget* parent, const char* name, WFlags f) :
77 QWidget( parent, name, f ), scaledWidth( 0 ), scaledHeight( 0 ) 77 QWidget( parent, name, f ), scaledWidth( 0 ), scaledHeight( 0 )
78{ 78{
79 setCaption( tr("OpiePlayer") ); 79 setCaption( tr("OpiePlayer") );
80 Config cfg("OpiePlayer"); 80 Config cfg("OpiePlayer");
81 81
82 cfg.setGroup("Options"); 82 cfg.setGroup("Options");
83 skin = cfg.readEntry("Skin","default"); 83 skin = cfg.readEntry("Skin","default");
84 84
85 QString skinPath; 85 QString skinPath;
86 skinPath = "opieplayer2/skins/" + skin; 86 skinPath = "opieplayer2/skins/" + skin;
87 if(!QDir(QString(getenv("OPIEDIR")) +"/pics/"+skinPath).exists()) 87 if(!QDir(QString(getenv("OPIEDIR")) +"/pics/"+skinPath).exists())
88 skinPath = "opieplayer2/skins/default"; 88 skinPath = "opieplayer2/skins/default";
89 89
90 90
91// QString skinPath = "opieplayer2/skins/" + skin; 91// QString skinPath = "opieplayer2/skins/" + skin;
92 92
93 pixBg = new QPixmap( Resource::loadPixmap( QString("%1/background").arg(skinPath) ) ); 93 pixBg = new QPixmap( Resource::loadPixmap( QString("%1/background").arg(skinPath) ) );
94 imgUp = new QImage( Resource::loadImage( QString("%1/skinV_up").arg(skinPath) ) ); 94 imgUp = new QImage( Resource::loadImage( QString("%1/skinV_up").arg(skinPath) ) );
95 imgDn = new QImage( Resource::loadImage( QString("%1/skinV_down").arg(skinPath) ) ); 95 imgDn = new QImage( Resource::loadImage( QString("%1/skinV_down").arg(skinPath) ) );
96 96
97 imgButtonMask = new QImage( imgUp->width(), imgUp->height(), 8, 255 ); 97 imgButtonMask = new QImage( imgUp->width(), imgUp->height(), 8, 255 );
98 imgButtonMask->fill( 0 ); 98 imgButtonMask->fill( 0 );
99 99
100 for ( int i = 0; i < 7; i++ ) { 100 for ( int i = 0; i < 7; i++ ) {
101 QString filename = QString( QPEApplication::qpeDir() + "/pics/" + skinPath + 101 QString filename = QString( QPEApplication::qpeDir() + "pics/" + skinPath +
102 "/skinV_mask_" + skinV_mask_file_names[i] + ".png" ); 102 "/skinV_mask_" + skinV_mask_file_names[i] + ".png" );
103 // odebug << "loading "+filename << oendl; 103 // odebug << "loading "+filename << oendl;
104 masks[i] = new QBitmap( filename ); 104 masks[i] = new QBitmap( filename );
105 105
106 if ( !masks[i]->isNull() ) { 106 if ( !masks[i]->isNull() ) {
107 QImage imgMask = masks[i]->convertToImage(); 107 QImage imgMask = masks[i]->convertToImage();
108 uchar **dest = imgButtonMask->jumpTable(); 108 uchar **dest = imgButtonMask->jumpTable();
109 for ( int y = 0; y < imgUp->height(); y++ ) { 109 for ( int y = 0; y < imgUp->height(); y++ ) {
110 uchar *line = dest[y]; 110 uchar *line = dest[y];
111 for ( int x = 0; x < imgUp->width(); x++ ) { 111 for ( int x = 0; x < imgUp->width(); x++ ) {
112 if ( !qRed( imgMask.pixel( x, y ) ) ) 112 if ( !qRed( imgMask.pixel( x, y ) ) )
113 line[x] = i + 1; 113 line[x] = i + 1;
114 } 114 }
115 } 115 }
116 } 116 }
117 } 117 }
118 for ( int i = 0; i < 7; i++ ) { 118 for ( int i = 0; i < 7; i++ ) {
119 buttonPixUp[i] = NULL; 119 buttonPixUp[i] = NULL;
120 buttonPixDown[i] = NULL; 120 buttonPixDown[i] = NULL;
121 } 121 }
122 122
123 QWidget *d = QApplication::desktop(); 123 QWidget *d = QApplication::desktop();
124 int width = d->width(); 124 int width = d->width();
125 int height = d->height(); 125 int height = d->height();