summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/mediawidget.cpp11
-rw-r--r--noncore/multimedia/opieplayer2/mediawidget.h2
2 files changed, 8 insertions, 5 deletions
diff --git a/noncore/multimedia/opieplayer2/mediawidget.cpp b/noncore/multimedia/opieplayer2/mediawidget.cpp
index 3a44185..b73a5c0 100644
--- a/noncore/multimedia/opieplayer2/mediawidget.cpp
+++ b/noncore/multimedia/opieplayer2/mediawidget.cpp
@@ -98,6 +98,6 @@ bool MediaWidget::isOverButton( const QPoint &position, int buttonId ) const
-void MediaWidget::paintButton( int buttonId )
+void MediaWidget::paintButton( const Button &button )
{
QPainter p( this );
- paintButton( p, buttons[ buttonId ] );
+ paintButton( p, button );
}
@@ -114,4 +114,7 @@ void MediaWidget::toggleButton( int buttonId )
{
- buttons[ buttonId ].isDown = !buttons[ buttonId ].isDown;
- paintButton( buttonId );
+ Button &button = buttons[ buttonId ];
+
+ button.isDown = !button.isDown;
+
+ paintButton( button );
}
diff --git a/noncore/multimedia/opieplayer2/mediawidget.h b/noncore/multimedia/opieplayer2/mediawidget.h
index 8cdaad1..dcf7fb8 100644
--- a/noncore/multimedia/opieplayer2/mediawidget.h
+++ b/noncore/multimedia/opieplayer2/mediawidget.h
@@ -89,3 +89,3 @@ protected:
- void paintButton( int buttonId );
+ void paintButton( const Button &button );
void paintButton( QPainter &p, const Button &button );