summaryrefslogtreecommitdiffstats
path: root/src/kpowersave.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-10-11 11:53:34 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-10-11 11:53:34 -0500
commitea31ec697bdb9d548de7e027099c128c59dadca6 (patch)
tree02703d747e58372140017daf164512fd95ddc939 /src/kpowersave.cpp
parent989ae9f31b5497c833152fe2af55df23695e0b1f (diff)
downloadtdepowersave-ea31ec697bdb9d548de7e027099c128c59dadca6.tar.gz
tdepowersave-ea31ec697bdb9d548de7e027099c128c59dadca6.zip
Reload icon when tray size changes
This partially resolves Bug 1248
Diffstat (limited to 'src/kpowersave.cpp')
-rw-r--r--src/kpowersave.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/kpowersave.cpp b/src/kpowersave.cpp
index 3f19e22..85a9440 100644
--- a/src/kpowersave.cpp
+++ b/src/kpowersave.cpp
@@ -233,7 +233,7 @@ void kpowersave::initMenu() {
void kpowersave::resizeEvent ( TQResizeEvent * )
{
// Honor Free Desktop specifications that allow for arbitrary system tray icon sizes
- loadIcon();
+ loadIcon(true);
drawIcon();
}
@@ -304,7 +304,7 @@ void kpowersave::showConfigureNotificationsDialog() {
* To reduce the systemload the icons are only reloaded if \ref pixmap_name
* is changed.
*/
-void kpowersave::loadIcon(){
+void kpowersave::loadIcon(bool forceReload){
kdDebugFuncIn(trace);
TQString pixmap_name_tmp = "NONE";
@@ -352,7 +352,7 @@ void kpowersave::loadIcon(){
}
// reload icon only if new icon selected
- if(pixmap_name_tmp != pixmap_name) {
+ if ((pixmap_name_tmp != pixmap_name) || (forceReload)) {
pixmap_name = pixmap_name_tmp;
if (pixmap_name.startsWith("ERROR")) {
pixmap = SmallIcon("laptoppower", width(), KIcon::DisabledState);