-rw-r--r-- | noncore/applets/notesapplet/notes.cpp | 40 |
1 files changed, 5 insertions, 35 deletions
diff --git a/noncore/applets/notesapplet/notes.cpp b/noncore/applets/notesapplet/notes.cpp index b3e72a7..d06672a 100644 --- a/noncore/applets/notesapplet/notes.cpp +++ b/noncore/applets/notesapplet/notes.cpp @@ -21,12 +21,13 @@ #include <qpe/filemanager.h> #include <qpe/qpeapplication.h> #include <qpe/timestring.h> #include <qpe/applnk.h> #include <qpe/ir.h> #include <qpe/config.h> +#include <qpe/resource.h> using namespace Opie::Core; using namespace Opie::Ui; /* QT */ #include <qmultilineedit.h> #include <qlistbox.h> @@ -45,44 +46,12 @@ using namespace Opie::Ui; #include <qstringlist.h> #include <qtimer.h> /* STD */ #include <stdlib.h> -/* XPM */ -static char * notes_xpm[] = { -"16 16 11 1", -" c None", -". c #000000", -"+ c #7F7F7F", -"@ c #BFBFBF", -"# c #BFC1FF", -"$ c #FF0000", -"% c #FFFFFF", -"& c #00037F", -"* c #0006FF", -"= c #0005BF", -"- c #7F0000", -" .. ", -" .. ", -" ... ", -" .+ ", -" .@. ", -" . .+ ", -" ..#.@. ", -" ..###.+.. ", -" ..###$...##.. ", -"..###$$$%+$$##&.", -".*=####$-###&=&.", -".=**=###==&=&=..", -" ..=**=#&=&=.. ", -" ..=*=&=.. ", -" ..=.. ", -" . "}; - - NotesControl::NotesControl( QWidget *, const char * ) : QVBox( 0, "NotesControl",/* WDestructiveClose | */WStyle_StaysOnTop ) // : QFrame( parent, name, WDestructiveClose | WStyle_StaysOnTop | WType_Popup ) { QDir d( QDir::homeDirPath()+"/notes"); if( !d.exists()) { @@ -458,14 +427,15 @@ void NotesControl::slotSearch() { // } //=========================================================================== NotesApplet::NotesApplet( QWidget *parent, const char *name ) : QWidget( parent, name ) { - setFixedHeight( 18 ); - setFixedWidth( 14 ); + setFixedHeight( AppLnk::smallIconSize() ); + setFixedWidth( AppLnk::smallIconSize() ); + notesPixmap.convertFromImage( Resource::loadImage( "edit" ).smoothScale( height(), width() ) ); vc = new NotesControl; } NotesApplet::~NotesApplet() { delete vc; } @@ -505,12 +475,12 @@ void NotesApplet::mousePressEvent( QMouseEvent *) { vc->view->setFocus(); } } void NotesApplet::paintEvent( QPaintEvent* ) { QPainter p(this); - p.drawPixmap( 0, 1, ( const char** ) notes_xpm ); + p.drawPixmap( 0, 2, notesPixmap ); } EXPORT_OPIE_APPLET_v1( NotesApplet ) |