|
|
@ -236,6 +236,13 @@ void kpowersave::initMenu() {
|
|
|
|
kdDebugFuncOut(trace);
|
|
|
|
kdDebugFuncOut(trace);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void kpowersave::resizeEvent ( QResizeEvent * )
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
// Honor Free Desktop specifications that allow for arbitrary system tray icon sizes
|
|
|
|
|
|
|
|
loadIcon();
|
|
|
|
|
|
|
|
drawIcon();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
/*!
|
|
|
|
* This funtion load and manipulate the icons for the kickerapplet-section.
|
|
|
|
* This funtion load and manipulate the icons for the kickerapplet-section.
|
|
|
|
* The redraw interval depends on \ref icon_set_colored and \ref BAT_icon_BG_intervall.
|
|
|
|
* The redraw interval depends on \ref icon_set_colored and \ref BAT_icon_BG_intervall.
|
|
|
@ -354,10 +361,10 @@ void kpowersave::loadIcon(){
|
|
|
|
if(pixmap_name_tmp != pixmap_name) {
|
|
|
|
if(pixmap_name_tmp != pixmap_name) {
|
|
|
|
pixmap_name = pixmap_name_tmp;
|
|
|
|
pixmap_name = pixmap_name_tmp;
|
|
|
|
if (pixmap_name.startsWith("ERROR")) {
|
|
|
|
if (pixmap_name.startsWith("ERROR")) {
|
|
|
|
pixmap = SmallIcon("laptoppower", 22, KIcon::DisabledState);
|
|
|
|
pixmap = SmallIcon("laptoppower", width(), KIcon::DisabledState);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
pixmap = SmallIcon(pixmap_name, 22);
|
|
|
|
pixmap = SmallIcon(pixmap_name, width());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
kdDebugFuncOut(trace);
|
|
|
|
kdDebugFuncOut(trace);
|
|
|
@ -427,6 +434,7 @@ void kpowersave::drawIcon(){
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
quit:
|
|
|
|
quit:
|
|
|
|
|
|
|
|
image = image.smoothScale(width(), height());
|
|
|
|
fullIcon.convertFromImage(image);
|
|
|
|
fullIcon.convertFromImage(image);
|
|
|
|
setPixmap(fullIcon);
|
|
|
|
setPixmap(fullIcon);
|
|
|
|
|
|
|
|
|
|
|
|