diff options
Diffstat (limited to 'kmix/kmixdockwidget.cpp')
-rw-r--r-- | kmix/kmixdockwidget.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/kmix/kmixdockwidget.cpp b/kmix/kmixdockwidget.cpp index eaaf4029..ae6bdb25 100644 --- a/kmix/kmixdockwidget.cpp +++ b/kmix/kmixdockwidget.cpp @@ -240,12 +240,14 @@ KMixDockWidget::updatePixmap(bool force) TQPixmap scaledpixmap; TQImage newIcon; switch ( newPixmapType ) { - case 'e': origpixmap = loadSizedIcon( "kmixdocked_error", width() ); break; - case 'm': origpixmap = loadSizedIcon( "kmixdocked_mute" , width() ); break; - case 'd': origpixmap = loadSizedIcon( "kmixdocked" , width() ); break; + case 'e': origpixmap = isShown() ? loadSizedIcon( "kmixdocked_error", width() ) : loadIcon( "kmixdocked_error"); break; + case 'm': origpixmap = isShown() ? loadSizedIcon( "kmixdocked_mute" , width() ) : loadIcon( "kmixdocked_mute"); break; + case 'd': origpixmap = isShown() ? loadSizedIcon( "kmixdocked" , width() ) : loadIcon( "kmixdocked "); break; } newIcon = origpixmap; - newIcon = newIcon.smoothScale(width(), height()); + if (isShown()) { + newIcon = newIcon.smoothScale(width(), height()); + } scaledpixmap = newIcon; setPixmap(scaledpixmap); @@ -258,6 +260,11 @@ void KMixDockWidget::resizeEvent ( TQResizeEvent * ) updatePixmap(true); } +void KMixDockWidget::showEvent ( TQShowEvent * ) +{ + updatePixmap(true); +} + void KMixDockWidget::mousePressEvent(TQMouseEvent *me) { |