summaryrefslogtreecommitdiffstats
path: root/kmix
diff options
context:
space:
mode:
Diffstat (limited to 'kmix')
-rw-r--r--kmix/kmixdockwidget.cpp15
-rw-r--r--kmix/kmixdockwidget.h1
2 files changed, 12 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)
{
diff --git a/kmix/kmixdockwidget.h b/kmix/kmixdockwidget.h
index 2315a087..0899d28f 100644
--- a/kmix/kmixdockwidget.h
+++ b/kmix/kmixdockwidget.h
@@ -69,6 +69,7 @@ class KMixDockWidget : public KSystemTray {
void contextMenuAboutToShow( TDEPopupMenu* menu );
void toggleMinimizeRestore();
void resizeEvent ( TQResizeEvent * );
+ void showEvent ( TQShowEvent * );
private:
bool _playBeepOnVolumeChange;