summaryrefslogtreecommitdiff
path: root/noncore/multimedia
authorsimon <simon>2002-12-09 15:23:45 (UTC)
committer simon <simon>2002-12-09 15:23:45 (UTC)
commitab22599627d84a6c6427d2440da4271b48f47c8e (patch) (side-by-side diff)
tree7afdd78444dc58245a5dd3a110f454354ddd3e2f /noncore/multimedia
parent47d689545e68f2439cc88630ac78016712f92cc9 (diff)
downloadopie-ab22599627d84a6c6427d2440da4271b48f47c8e.zip
opie-ab22599627d84a6c6427d2440da4271b48f47c8e.tar.gz
opie-ab22599627d84a6c6427d2440da4271b48f47c8e.tar.bz2
- minor cleanup
Diffstat (limited to 'noncore/multimedia') (more/less context) (ignore 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
@@ -96,10 +96,10 @@ bool MediaWidget::isOverButton( const QPoint &position, int buttonId ) const
buttonMask.pixelIndex( position.x(), position.y() ) == buttonId + 1 );
}
-void MediaWidget::paintButton( int buttonId )
+void MediaWidget::paintButton( const Button &button )
{
QPainter p( this );
- paintButton( p, buttons[ buttonId ] );
+ paintButton( p, button );
}
void MediaWidget::paintButton( QPainter &p, const Button &button )
@@ -112,8 +112,11 @@ void MediaWidget::paintButton( QPainter &p, const Button &button )
void MediaWidget::toggleButton( int buttonId )
{
- buttons[ buttonId ].isDown = !buttons[ buttonId ].isDown;
- paintButton( buttonId );
+ Button &button = buttons[ buttonId ];
+
+ button.isDown = !button.isDown;
+
+ paintButton( button );
}
/* vim: et sw=4 ts=4
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
@@ -87,7 +87,7 @@ protected:
bool isOverButton( const QPoint &position, int buttonId ) const;
- void paintButton( int buttonId );
+ void paintButton( const Button &button );
void paintButton( QPainter &p, const Button &button );
void toggleButton( int buttonId );