author | simon <simon> | 2002-12-08 22:58:45 (UTC) |
---|---|---|
committer | simon <simon> | 2002-12-08 22:58:45 (UTC) |
commit | 7b38c0424eca2f49a0c9a931766c816e21f1d86b (patch) (unidiff) | |
tree | e310c27ad3592e46fc1a46d963ae24b2f299c949 /noncore/multimedia/opieplayer2/videowidget.cpp | |
parent | df6b6a0222e99736284ed8ebb9a7d8068751339b (diff) | |
download | opie-7b38c0424eca2f49a0c9a931766c816e21f1d86b.zip opie-7b38c0424eca2f49a0c9a931766c816e21f1d86b.tar.gz opie-7b38c0424eca2f49a0c9a931766c816e21f1d86b.tar.bz2 |
- merged the two duplicated toggleButton methods into a shared one
Diffstat (limited to 'noncore/multimedia/opieplayer2/videowidget.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/videowidget.cpp | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp index 3e677c6..77eab71 100644 --- a/noncore/multimedia/opieplayer2/videowidget.cpp +++ b/noncore/multimedia/opieplayer2/videowidget.cpp | |||
@@ -260,18 +260,12 @@ void VideoWidget::updateSlider( long i, long max ) { | |||
260 | void VideoWidget::setToggleButton( int i, bool down ) { | 260 | void VideoWidget::setToggleButton( int i, bool down ) { |
261 | if ( down != buttons[i].isDown ) { | 261 | if ( down != buttons[i].isDown ) { |
262 | toggleButton( i ); | 262 | toggleButton( i ); |
263 | } | 263 | } |
264 | } | 264 | } |
265 | 265 | ||
266 | void VideoWidget::toggleButton( int i ) { | ||
267 | buttons[i].isDown = !buttons[i].isDown; | ||
268 | QPainter p(this); | ||
269 | paintButton ( p, i ); | ||
270 | } | ||
271 | |||
272 | void VideoWidget::paintButton( QPainter &p, int i ) { | 266 | void VideoWidget::paintButton( QPainter &p, int i ) { |
273 | 267 | ||
274 | if ( buttons[i].isDown ) { | 268 | if ( buttons[i].isDown ) { |
275 | p.drawPixmap( upperLeftOfButtonMask, *buttonPixDown[i] ); | 269 | p.drawPixmap( upperLeftOfButtonMask, *buttonPixDown[i] ); |
276 | } else { | 270 | } else { |
277 | p.drawPixmap( upperLeftOfButtonMask, *buttonPixUp[i] ); | 271 | p.drawPixmap( upperLeftOfButtonMask, *buttonPixUp[i] ); |