summaryrefslogtreecommitdiff
authorsimon <simon>2002-12-11 01:24:05 (UTC)
committer simon <simon>2002-12-11 01:24:05 (UTC)
commit3ec7f32d0924c737664a6ad4dfb43dc3c20605d0 (patch) (side-by-side diff)
treebb9a9dcef582754293be5e1f7367c64e178c8243
parentd67ad1a6ef93d358beab268153cf2b0694e5f633 (diff)
downloadopie-3ec7f32d0924c737664a6ad4dfb43dc3c20605d0.zip
opie-3ec7f32d0924c737664a6ad4dfb43dc3c20605d0.tar.gz
opie-3ec7f32d0924c737664a6ad4dfb43dc3c20605d0.tar.bz2
- make more use of the Resource::* api for loading the data
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/mediawidget.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/multimedia/opieplayer2/mediawidget.cpp b/noncore/multimedia/opieplayer2/mediawidget.cpp
index c9d7db8..865ff91 100644
--- a/noncore/multimedia/opieplayer2/mediawidget.cpp
+++ b/noncore/multimedia/opieplayer2/mediawidget.cpp
@@ -63,25 +63,25 @@ MediaWidget::Button MediaWidget::setupButton( const SkinButtonInfo &buttonInfo,
button.command = buttonInfo.command;
button.type = buttonInfo.type;
QString fileName = imagePrefix + buttonInfo.fileName + ".png";
button.mask = setupButtonMask( button.command, fileName );
return button;
}
QBitmap MediaWidget::setupButtonMask( const Command &command, const QString &fileName )
{
- QBitmap mask( fileName );
+ QBitmap mask( Resource::findPixmap( fileName ) );
if ( mask.isNull() )
return mask;
QImage imgMask = mask.convertToImage();
uchar **dest = buttonMask.jumpTable();
for ( int y = 0; y < buttonMask.height(); y++ ) {
uchar *line = dest[y];
for ( int x = 0; x < buttonMask.width(); x++ )
if ( !qRed( imgMask.pixel( x, y ) ) )
line[x] = command + 1;
}
@@ -96,25 +96,25 @@ void MediaWidget::loadDefaultSkin( const SkinButtonInfo *skinInfo, uint buttonCo
loadSkin( skinInfo, buttonCount, skin, fileNameInfix );
}
void MediaWidget::loadSkin( const SkinButtonInfo *skinInfo, uint buttonCount, const QString &name, const QString &fileNameInfix )
{
QString skinPath = "opieplayer2/skins/" + name;
backgroundPixmap = QPixmap( Resource::loadPixmap( QString( "%1/background" ).arg( skinPath ) ) );
buttonUpImage = QImage( Resource::loadImage( QString( "%1/skin%2_up" ).arg( skinPath ).arg( fileNameInfix ) ) );
buttonDownImage = QImage( Resource::loadImage( QString( "%1/skin%2_down" ).arg( skinPath ).arg( fileNameInfix ) ) );
setupButtons( skinInfo, buttonCount,
- QPEApplication::qpeDir() + "/pics/" + skinPath + QString::fromLatin1( "/skin%1_mask_" ).arg( fileNameInfix ), buttonUpImage.size() );
+ skinPath + QString::fromLatin1( "/skin%1_mask_" ).arg( fileNameInfix ), buttonUpImage.size() );
}
void MediaWidget::closeEvent( QCloseEvent * )
{
mediaPlayerState.setList();
}
void MediaWidget::paintEvent( QPaintEvent *pe )
{
QPainter p( this );
if ( mediaPlayerState.isFullscreen() ) {