diff --git a/src/libtomahawk/widgets/ImageButton.cpp b/src/libtomahawk/widgets/ImageButton.cpp index eda2ba967..f2dbad480 100644 --- a/src/libtomahawk/widgets/ImageButton.cpp +++ b/src/libtomahawk/widgets/ImageButton.cpp @@ -1,6 +1,6 @@ /* === This file is part of Tomahawk Player - === * - * Copyright 2010-2011, Christian Muehlhaeuser + * Copyright 2010-2014, Christian Muehlhaeuser * Copyright 2010-2011, Jeff Mitchell * * Tomahawk is free software: you can redistribute it and/or modify @@ -77,6 +77,7 @@ ImageButton::clear() setIcon( QIcon() ); } + void ImageButton::paintEvent( QPaintEvent* event ) { @@ -85,14 +86,15 @@ ImageButton::paintEvent( QPaintEvent* event ) QIcon::Mode mode = isDown() ? QIcon::Active - : isEnabled() - ? QIcon::Normal - : QIcon::Disabled; + : QIcon::Normal; QIcon::State state = isChecked() ? QIcon::On : QIcon::Off; + if ( !isEnabled() ) + p.setOpacity( 0.4 ); + icon().paint( &p, rect(), Qt::AlignCenter, mode, state ); }