diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-05-10 03:05:08 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-05-10 03:05:08 +0000 |
commit | 54887c51b14c7707178d43d39413bf1bc7a17472 (patch) | |
tree | 759a415a01e0b1f588c94ef8584d60121da96439 /korganizer/korgac | |
parent | 3ef2d4c713c90cf32f0a976aed547e281840575b (diff) | |
download | tdepim-54887c51b14c7707178d43d39413bf1bc7a17472.tar.gz tdepim-54887c51b14c7707178d43d39413bf1bc7a17472.zip |
Part of batch commit to enable true tasktray resize support for Trinity applications
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1124759 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'korganizer/korgac')
-rw-r--r-- | korganizer/korgac/alarmdockwindow.cpp | 15 | ||||
-rw-r--r-- | korganizer/korgac/alarmdockwindow.h | 1 |
2 files changed, 14 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 ); diff --git a/korganizer/korgac/alarmdockwindow.h b/korganizer/korgac/alarmdockwindow.h index 5671b92f7..f26b6d8c1 100644 --- a/korganizer/korgac/alarmdockwindow.h +++ b/korganizer/korgac/alarmdockwindow.h @@ -50,6 +50,7 @@ class AlarmDockWindow : public KSystemTray protected: void mousePressEvent( QMouseEvent * ); // void closeEvent( QCloseEvent * ); + void resizeEvent ( QResizeEvent * ); protected slots: void slotQuit(); |