summaryrefslogtreecommitdiffstats
path: root/korganizer/korgac/alarmdockwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'korganizer/korgac/alarmdockwindow.cpp')
-rw-r--r--korganizer/korgac/alarmdockwindow.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/korganizer/korgac/alarmdockwindow.cpp b/korganizer/korgac/alarmdockwindow.cpp
index 5f2c419c7..074ee9206 100644
--- a/korganizer/korgac/alarmdockwindow.cpp
+++ b/korganizer/korgac/alarmdockwindow.cpp
@@ -58,8 +58,8 @@ AlarmDockWindow::AlarmDockWindow( const char *name )
// Set up icons
KGlobal::iconLoader()->addAppDir( "korgac" );
- mPixmapEnabled = loadIcon( "korgac" );
- mPixmapDisabled = loadIcon( "korgac_disabled" );
+ mPixmapEnabled = loadSizedIcon( "korgac", width() );
+ mPixmapDisabled = loadSizedIcon( "korgac_disabled", width() );
setPixmap( alarmsEnabled ? mPixmapEnabled : mPixmapDisabled );
@@ -104,6 +104,17 @@ AlarmDockWindow::~AlarmDockWindow()
{
}
+void AlarmDockWindow::resizeEvent ( QResizeEvent * )
+{
+ // Honor Free Desktop specifications that allow for arbitrary system tray icon sizes
+ mPixmapEnabled = loadSizedIcon( "korgac", width() );
+ mPixmapDisabled = loadSizedIcon( "korgac_disabled", width() );
+
+ KConfig *config = kapp->config();
+ bool alarmsEnabled = config->readBoolEntry( "Enabled", true );
+ setPixmap( alarmsEnabled ? mPixmapEnabled : mPixmapDisabled );
+}
+
void AlarmDockWindow::slotUpdate( int reminders )
{
QToolTip::remove( this );