Diffstat (limited to 'noncore/multimedia/opieplayer2/videowidget.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/videowidget.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp index bce6b89..48caf00 100644 --- a/noncore/multimedia/opieplayer2/videowidget.cpp +++ b/noncore/multimedia/opieplayer2/videowidget.cpp @@ -86,12 +86,17 @@ VideoWidget::VideoWidget(QWidget* parent, const char* name, WFlags f) : Config cfg("OpiePlayer"); cfg.setGroup("VideoWidget"); - QString backgroundPix, Button0aPix, Button0bPix, controlsPix; - backgroundPix=cfg.readEntry( "backgroundPix", "opieplayer/metalFinish"); + QString Button0aPix, Button0bPix, controlsPix; + //backgroundPix=cfg.readEntry( "backgroundPix", "opieplayer/metalFinish"); Button0aPix=cfg.readEntry( "Button0aPix", "opieplayer/mediaButton0a"); Button0bPix=cfg.readEntry( "Button0bPix","opieplayer/mediaButton0b"); controlsPix=cfg.readEntry( "controlsPix","opieplayer/mediaControls0" ); + cfg.setGroup("AudioWidget"); + QString skin = cfg.readEntry("Skin","default"); + QString skinPath = "opieplayer/skins/" + skin; + backgroundPix = QString("%1/background").arg(skinPath) ; + setBackgroundPixmap( Resource::loadPixmap( backgroundPix) ); pixmaps[0] = new QPixmap( Resource::loadPixmap( Button0aPix ) ); pixmaps[1] = new QPixmap( Resource::loadPixmap( Button0bPix ) ); @@ -123,7 +128,7 @@ VideoWidget::VideoWidget(QWidget* parent, const char* name, WFlags f) : setPlaying( mediaPlayerState->playing() ); videoFrame = new XineVideoWidget( 240, 155 ,this, "Video frame" ); - videoFrame->setGeometry( QRect( 0, 15 , 240 ,170 ) ); + } @@ -275,7 +280,7 @@ void VideoWidget::makeVisible() { resize( qApp->desktop()->size() ); slider->hide(); } else { - setBackgroundPixmap( Resource::loadPixmap( "opieplayer/metalFinish" ) ); + setBackgroundPixmap( Resource::loadPixmap( backgroundPix ) ); showNormal(); showMaximized(); slider->show(); @@ -292,7 +297,10 @@ void VideoWidget::paintEvent( QPaintEvent * ) { videoFrame->setGeometry( QRect( 0, 0 , 240 ,340 ) ); } else { + + videoFrame->setGeometry( QRect( 0, 15 , 240 ,170 ) ); // draw the buttons + for ( int i = 0; i < numButtons; i++ ) { paintButton( &p, i ); } |