diff options
Diffstat (limited to 'korganizer')
-rw-r--r-- | korganizer/korgac/alarmdockwindow.cpp | 16 | ||||
-rw-r--r-- | korganizer/korgac/alarmdockwindow.h | 4 |
2 files changed, 17 insertions, 3 deletions
diff --git a/korganizer/korgac/alarmdockwindow.cpp b/korganizer/korgac/alarmdockwindow.cpp index f8f15addf..1f5d5b33c 100644 --- a/korganizer/korgac/alarmdockwindow.cpp +++ b/korganizer/korgac/alarmdockwindow.cpp @@ -58,8 +58,8 @@ AlarmDockWindow::AlarmDockWindow( const char *name ) // Set up icons TDEGlobal::iconLoader()->addAppDir( "korgac" ); - mPixmapEnabled = loadSizedIcon( "korgac", width() ); - mPixmapDisabled = loadSizedIcon( "korgac_disabled", width() ); + mPixmapEnabled = loadIcon( "korgac" ); + mPixmapDisabled = loadIcon( "korgac_disabled" ); setPixmap( alarmsEnabled ? mPixmapEnabled : mPixmapDisabled ); @@ -104,7 +104,7 @@ AlarmDockWindow::~AlarmDockWindow() { } -void AlarmDockWindow::resizeEvent ( TQResizeEvent * ) +void AlarmDockWindow::resizeTrayIcon () { // Honor Free Desktop specifications that allow for arbitrary system tray icon sizes mPixmapEnabled = loadSizedIcon( "korgac", width() ); @@ -115,6 +115,16 @@ void AlarmDockWindow::resizeEvent ( TQResizeEvent * ) setPixmap( alarmsEnabled ? mPixmapEnabled : mPixmapDisabled ); } +void AlarmDockWindow::resizeEvent ( TQResizeEvent * ) +{ + resizeTrayIcon(); +} + +void AlarmDockWindow::showEvent ( TQShowEvent * ) +{ + resizeTrayIcon(); +} + void AlarmDockWindow::slotUpdate( int reminders ) { TQToolTip::remove( this ); diff --git a/korganizer/korgac/alarmdockwindow.h b/korganizer/korgac/alarmdockwindow.h index 6f317fda8..6f6cd7bdb 100644 --- a/korganizer/korgac/alarmdockwindow.h +++ b/korganizer/korgac/alarmdockwindow.h @@ -52,6 +52,7 @@ class AlarmDockWindow : public KSystemTray void mousePressEvent( TQMouseEvent * ); // void closeEvent( TQCloseEvent * ); void resizeEvent ( TQResizeEvent * ); + void showEvent ( TQShowEvent * ); protected slots: void slotQuit(); @@ -59,6 +60,9 @@ class AlarmDockWindow : public KSystemTray void slotDismissAll(); private: + void resizeTrayIcon(); + + private: TQPixmap mPixmapEnabled; TQPixmap mPixmapDisabled; TQString mName; |