diff options
Diffstat (limited to 'knotes')
-rw-r--r-- | knotes/knotesapp.cpp | 16 | ||||
-rw-r--r-- | knotes/knotesapp.h | 2 |
2 files changed, 16 insertions, 2 deletions
diff --git a/knotes/knotesapp.cpp b/knotes/knotesapp.cpp index 26aee48c3..14fd625b9 100644 --- a/knotes/knotesapp.cpp +++ b/knotes/knotesapp.cpp @@ -105,7 +105,7 @@ KNotesApp::KNotesApp() KWin::setSystemTrayWindowFor( winId(), tqt_xrootwin() ); TQToolTip::add( this, i18n( "KNotes: Sticky notes for TDE" ) ); setBackgroundMode( X11ParentRelative ); - setPixmap( KSystemTray::loadSizedIcon( "knotes", TQWidget::width() ) ); + setPixmap( KSystemTray::loadIcon( "knotes" ) ); // set the initial style KNote::setStyle( KNotesGlobalConfig::style() ); @@ -210,7 +210,7 @@ KNotesApp::KNotesApp() updateNoteActions(); } -void KNotesApp::resizeEvent ( TQResizeEvent * ) +void KNotesApp::resizeTrayIcon () { // Honor Free Desktop specifications that allow for arbitrary system tray icon sizes TQPixmap origpixmap; @@ -223,6 +223,18 @@ void KNotesApp::resizeEvent ( TQResizeEvent * ) setPixmap(scaledpixmap); } +void KNotesApp::resizeEvent ( TQResizeEvent * ) +{ + // Honor Free Desktop specifications that allow for arbitrary system tray icon sizes + resizeTrayIcon(); +} + +void KNotesApp::showEvent ( TQShowEvent * ) +{ + // Honor Free Desktop specifications that allow for arbitrary system tray icon sizes + resizeTrayIcon(); +} + KNotesApp::~KNotesApp() { saveNotes(); diff --git a/knotes/knotesapp.h b/knotes/knotesapp.h index 2c2656f3a..0888e20bb 100644 --- a/knotes/knotesapp.h +++ b/knotes/knotesapp.h @@ -104,6 +104,7 @@ public slots: protected: void mousePressEvent( TQMouseEvent* ); void resizeEvent ( TQResizeEvent * ); + void showEvent ( TQShowEvent * ); protected slots: void slotShowNote(); @@ -122,6 +123,7 @@ protected slots: private: void showNote( KNote *note ) const; void saveConfigs(); + void resizeTrayIcon(); private slots: void acceptConnection(); |