Diffstat (limited to 'noncore/multimedia/opieplayer2/skin.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/skin.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/noncore/multimedia/opieplayer2/skin.cpp b/noncore/multimedia/opieplayer2/skin.cpp index ef70957..d3918d1 100644 --- a/noncore/multimedia/opieplayer2/skin.cpp +++ b/noncore/multimedia/opieplayer2/skin.cpp @@ -10,10 +10,10 @@ Skin::Skin( const QString &name, const QString &fileNameInfix ) } -void Skin::preload( const MediaWidget::SkinButtonInfo *skinButtonInfo, uint buttonCount, const QSize &buttonAreaSize ) +void Skin::preload( const MediaWidget::SkinButtonInfo *skinButtonInfo, uint buttonCount ) { backgroundImage(); buttonUpImage(); buttonDownImage(); - ( void )buttonMask( skinButtonInfo, buttonCount, buttonAreaSize ); + ( void )buttonMask( skinButtonInfo, buttonCount ); } @@ -39,12 +39,11 @@ QImage Skin::buttonDownImage() const } -QImage Skin::buttonMask( const MediaWidget::SkinButtonInfo *skinButtonInfo, uint buttonCount, const QSize &buttonAreaSize ) const +QImage Skin::buttonMask( const MediaWidget::SkinButtonInfo *skinButtonInfo, uint buttonCount ) const { - if ( buttonAreaSize != m_buttonMask.size() ) - m_buttonMask = QImage(); - if ( !m_buttonMask.isNull() ) return m_buttonMask; + QSize buttonAreaSize = buttonUpImage().size(); + m_buttonMask = QImage( buttonAreaSize, 8, 255 ); m_buttonMask.fill( 0 ); |