Diffstat (limited to 'noncore/multimedia/opieplayer2/skin.cpp') (more/less context) (ignore 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 | |||
@@ -9,12 +9,12 @@ Skin::Skin( const QString &name, const QString &fileNameInfix ) | |||
9 | m_skinPath = "opieplayer2/skins/" + name; | 9 | m_skinPath = "opieplayer2/skins/" + name; |
10 | } | 10 | } |
11 | 11 | ||
12 | void Skin::preload( const MediaWidget::SkinButtonInfo *skinButtonInfo, uint buttonCount, const QSize &buttonAreaSize ) | 12 | void Skin::preload( const MediaWidget::SkinButtonInfo *skinButtonInfo, uint buttonCount ) |
13 | { | 13 | { |
14 | backgroundImage(); | 14 | backgroundImage(); |
15 | buttonUpImage(); | 15 | buttonUpImage(); |
16 | buttonDownImage(); | 16 | buttonDownImage(); |
17 | ( void )buttonMask( skinButtonInfo, buttonCount, buttonAreaSize ); | 17 | ( void )buttonMask( skinButtonInfo, buttonCount ); |
18 | } | 18 | } |
19 | 19 | ||
20 | QImage Skin::backgroundImage() const | 20 | QImage Skin::backgroundImage() const |
@@ -38,14 +38,13 @@ QImage Skin::buttonDownImage() const | |||
38 | return m_buttonDownImage; | 38 | return m_buttonDownImage; |
39 | } | 39 | } |
40 | 40 | ||
41 | QImage Skin::buttonMask( const MediaWidget::SkinButtonInfo *skinButtonInfo, uint buttonCount, const QSize &buttonAreaSize ) const | 41 | QImage Skin::buttonMask( const MediaWidget::SkinButtonInfo *skinButtonInfo, uint buttonCount ) const |
42 | { | 42 | { |
43 | if ( buttonAreaSize != m_buttonMask.size() ) | ||
44 | m_buttonMask = QImage(); | ||
45 | |||
46 | if ( !m_buttonMask.isNull() ) | 43 | if ( !m_buttonMask.isNull() ) |
47 | return m_buttonMask; | 44 | return m_buttonMask; |
48 | 45 | ||
46 | QSize buttonAreaSize = buttonUpImage().size(); | ||
47 | |||
49 | m_buttonMask = QImage( buttonAreaSize, 8, 255 ); | 48 | m_buttonMask = QImage( buttonAreaSize, 8, 255 ); |
50 | m_buttonMask.fill( 0 ); | 49 | m_buttonMask.fill( 0 ); |
51 | 50 | ||