diff options
Diffstat (limited to 'knotes/knotesapp.cpp')
-rw-r--r-- | knotes/knotesapp.cpp | 16 |
1 files changed, 14 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(); |