diff options
Diffstat (limited to 'src/kpowersave.cpp')
-rw-r--r-- | src/kpowersave.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/kpowersave.cpp b/src/kpowersave.cpp index d6d98c2..b372245 100644 --- a/src/kpowersave.cpp +++ b/src/kpowersave.cpp @@ -361,10 +361,11 @@ void kpowersave::loadIcon(bool forceReload){ if ((pixmap_name_tmp != pixmap_name) || (forceReload)) { pixmap_name = pixmap_name_tmp; if (pixmap_name.startsWith("ERROR")) { - pixmap = SmallIcon("laptoppower", width(), TDEIcon::DisabledState); + pixmap = SmallIcon("laptoppower", isShown() ? width() : 22, TDEIcon::DisabledState); + } + else { + pixmap = SmallIcon(pixmap_name, isShown() ? width() : 22); } - else - pixmap = SmallIcon(pixmap_name, width()); } kdDebugFuncOut(trace); @@ -435,7 +436,9 @@ void kpowersave::drawIcon(){ } } quit: - image = image.smoothScale(width(), height()); + if (isShown()) { + image = image.smoothScale(width(), height()); + } fullIcon.convertFromImage(image); setPixmap(fullIcon); |