summaryrefslogtreecommitdiff
authorsimon <simon>2002-12-15 11:20:13 (UTC)
committer simon <simon>2002-12-15 11:20:13 (UTC)
commitfadbd5b396636f7e235c2ca4e74d01129d800c21 (patch) (side-by-side diff)
treec3fba46f0dc00bdbbd19175539f332b951800832
parent3fb7da21aa421afdbdbfd6e02a457d7d55236ef7 (diff)
downloadopie-fadbd5b396636f7e235c2ca4e74d01129d800c21.zip
opie-fadbd5b396636f7e235c2ca4e74d01129d800c21.tar.gz
opie-fadbd5b396636f7e235c2ca4e74d01129d800c21.tar.bz2
- don't append .png to the button mask filenames
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/skin.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/multimedia/opieplayer2/skin.cpp b/noncore/multimedia/opieplayer2/skin.cpp
index 44f5ca2..742e495 100644
--- a/noncore/multimedia/opieplayer2/skin.cpp
+++ b/noncore/multimedia/opieplayer2/skin.cpp
@@ -125,49 +125,49 @@ QImage Skin::buttonMask( const MediaWidget::SkinButtonInfo *skinButtonInfo, uint
addButtonToMask( skinButtonInfo[ i ].command + 1, buttonMaskImage( skinButtonInfo[ i ].fileName ) );
return d->buttonMask;
}
void Skin::addButtonToMask( int tag, const QImage &maskImage ) const
{
if ( maskImage.isNull() )
return;
uchar **dest = d->buttonMask.jumpTable();
for ( int y = 0; y < d->buttonMask.height(); y++ ) {
uchar *line = dest[y];
for ( int x = 0; x < d->buttonMask.width(); x++ )
if ( !qRed( maskImage.pixel( x, y ) ) )
line[x] = tag;
}
}
QImage Skin::buttonMaskImage( const QString &fileName ) const
{
SkinData::ButtonMaskImageMap::Iterator it = d->buttonMasks.find( fileName );
if ( it == d->buttonMasks.end() ) {
QString prefix = m_skinPath + QString::fromLatin1( "/skin%1_mask_" ).arg( m_fileNameInfix );
- QString path = prefix + fileName + ".png";
+ QString path = prefix + fileName;
it = d->buttonMasks.insert( fileName, loadImage( path ) );
}
return *it;
}
QString Skin::defaultSkinName()
{
Config cfg( "OpiePlayer" );
cfg.setGroup( "Options" );
return cfg.readEntry( "Skin", "default" );
}
QImage Skin::loadImage( const QString &fileName )
{
return QImage( Resource::findPixmap( fileName ) );
}
SkinCache::SkinCache()
{
// let's say we cache two skins (audio+video) at maximum
m_cache.setMaxCost( 2 );
// ... and one background pixmap
m_backgroundPixmapCache.setMaxCost( 1 );
}