summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/mediawidget.cpp6
-rw-r--r--noncore/multimedia/opieplayer2/mediawidget.h2
-rw-r--r--noncore/multimedia/opieplayer2/skin.cpp11
-rw-r--r--noncore/multimedia/opieplayer2/skin.h4
4 files changed, 11 insertions, 12 deletions
diff --git a/noncore/multimedia/opieplayer2/mediawidget.cpp b/noncore/multimedia/opieplayer2/mediawidget.cpp
index da0706e..6b304ec 100644
--- a/noncore/multimedia/opieplayer2/mediawidget.cpp
+++ b/noncore/multimedia/opieplayer2/mediawidget.cpp
@@ -45,7 +45,7 @@ MediaWidget::~MediaWidget()
void MediaWidget::setupButtons( const SkinButtonInfo *skinInfo, uint buttonCount,
- const Skin &skin, const QSize &buttonAreaSize )
+ const Skin &skin )
{
- buttonMask = skin.buttonMask( skinInfo, buttonCount, buttonAreaSize );
+ buttonMask = skin.buttonMask( skinInfo, buttonCount );
buttons.clear();
@@ -86,5 +86,5 @@ void MediaWidget::loadSkin( const SkinButtonInfo *skinInfo, uint buttonCount, co
buttonDownImage = skin.buttonDownImage();
- setupButtons( skinInfo, buttonCount, skin, buttonUpImage.size() );
+ setupButtons( skinInfo, buttonCount, skin );
}
diff --git a/noncore/multimedia/opieplayer2/mediawidget.h b/noncore/multimedia/opieplayer2/mediawidget.h
index 4bd8760..0fe4772 100644
--- a/noncore/multimedia/opieplayer2/mediawidget.h
+++ b/noncore/multimedia/opieplayer2/mediawidget.h
@@ -103,5 +103,5 @@ signals:
protected:
void setupButtons( const SkinButtonInfo *skinInfo, uint buttonCount,
- const Skin &skin, const QSize &buttonAreaSize );
+ const Skin &skin );
Button setupButton( const SkinButtonInfo &buttonInfo, const Skin &skin );
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 );
diff --git a/noncore/multimedia/opieplayer2/skin.h b/noncore/multimedia/opieplayer2/skin.h
index 14873e7..ee19f4b 100644
--- a/noncore/multimedia/opieplayer2/skin.h
+++ b/noncore/multimedia/opieplayer2/skin.h
@@ -13,5 +13,5 @@ public:
Skin( const QString &name, const QString &fileNameInfix );
- void preload( const MediaWidget::SkinButtonInfo *skinButtonInfo, uint buttonCount, const QSize &buttonAreaSize );
+ void preload( const MediaWidget::SkinButtonInfo *skinButtonInfo, uint buttonCount );
QImage backgroundImage() const;
@@ -19,5 +19,5 @@ public:
QImage buttonDownImage() const;
- QImage buttonMask( const MediaWidget::SkinButtonInfo *skinButtonInfo, uint buttonCount, const QSize &buttonAreaSize ) const;
+ QImage buttonMask( const MediaWidget::SkinButtonInfo *skinButtonInfo, uint buttonCount ) const;
QImage buttonMaskImage( const QString &fileName ) const;