author | drw <drw> | 2005-03-08 21:50:02 (UTC) |
---|---|---|
committer | drw <drw> | 2005-03-08 21:50:02 (UTC) |
commit | 2b32d3e15f5774ee8f73977d606675e819498614 (patch) (unidiff) | |
tree | e30982f7bfdf36bb8bfc2e3762c2d9234b809607 | |
parent | d32769dbeedb21fd7bdafb1c762e4e501cb02961 (diff) | |
download | opie-2b32d3e15f5774ee8f73977d606675e819498614.zip opie-2b32d3e15f5774ee8f73977d606675e819498614.tar.gz opie-2b32d3e15f5774ee8f73977d606675e819498614.tar.bz2 |
Better version of icon
-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 @@ | |||
21 | #include <qpe/filemanager.h> | 21 | #include <qpe/filemanager.h> |
22 | #include <qpe/qpeapplication.h> | 22 | #include <qpe/qpeapplication.h> |
23 | #include <qpe/timestring.h> | 23 | #include <qpe/timestring.h> |
24 | #include <qpe/applnk.h> | 24 | #include <qpe/applnk.h> |
25 | #include <qpe/ir.h> | 25 | #include <qpe/ir.h> |
26 | #include <qpe/config.h> | 26 | #include <qpe/config.h> |
27 | #include <qpe/resource.h> | ||
27 | using namespace Opie::Core; | 28 | using namespace Opie::Core; |
28 | using namespace Opie::Ui; | 29 | using namespace Opie::Ui; |
29 | 30 | ||
30 | /* QT */ | 31 | /* QT */ |
31 | #include <qmultilineedit.h> | 32 | #include <qmultilineedit.h> |
32 | #include <qlistbox.h> | 33 | #include <qlistbox.h> |
@@ -45,44 +46,12 @@ using namespace Opie::Ui; | |||
45 | #include <qstringlist.h> | 46 | #include <qstringlist.h> |
46 | #include <qtimer.h> | 47 | #include <qtimer.h> |
47 | 48 | ||
48 | /* STD */ | 49 | /* STD */ |
49 | #include <stdlib.h> | 50 | #include <stdlib.h> |
50 | 51 | ||
51 | /* XPM */ | ||
52 | static char * notes_xpm[] = { | ||
53 | "16 16 11 1", | ||
54 | " c None", | ||
55 | ". c #000000", | ||
56 | "+ c #7F7F7F", | ||
57 | "@ c #BFBFBF", | ||
58 | "# c #BFC1FF", | ||
59 | "$ c #FF0000", | ||
60 | "% c #FFFFFF", | ||
61 | "& c #00037F", | ||
62 | "* c #0006FF", | ||
63 | "= c #0005BF", | ||
64 | "- c #7F0000", | ||
65 | " .. ", | ||
66 | " .. ", | ||
67 | " ... ", | ||
68 | " .+ ", | ||
69 | " .@. ", | ||
70 | " . .+ ", | ||
71 | " ..#.@. ", | ||
72 | " ..###.+.. ", | ||
73 | " ..###$...##.. ", | ||
74 | "..###$$$%+$$##&.", | ||
75 | ".*=####$-###&=&.", | ||
76 | ".=**=###==&=&=..", | ||
77 | " ..=**=#&=&=.. ", | ||
78 | " ..=*=&=.. ", | ||
79 | " ..=.. ", | ||
80 | " . "}; | ||
81 | |||
82 | |||
83 | NotesControl::NotesControl( QWidget *, const char * ) | 52 | NotesControl::NotesControl( QWidget *, const char * ) |
84 | : QVBox( 0, "NotesControl",/* WDestructiveClose | */WStyle_StaysOnTop ) | 53 | : QVBox( 0, "NotesControl",/* WDestructiveClose | */WStyle_StaysOnTop ) |
85 | // : QFrame( parent, name, WDestructiveClose | WStyle_StaysOnTop | WType_Popup ) | 54 | // : QFrame( parent, name, WDestructiveClose | WStyle_StaysOnTop | WType_Popup ) |
86 | { | 55 | { |
87 | QDir d( QDir::homeDirPath()+"/notes"); | 56 | QDir d( QDir::homeDirPath()+"/notes"); |
88 | if( !d.exists()) { | 57 | if( !d.exists()) { |
@@ -458,14 +427,15 @@ void NotesControl::slotSearch() { | |||
458 | // } | 427 | // } |
459 | 428 | ||
460 | //=========================================================================== | 429 | //=========================================================================== |
461 | 430 | ||
462 | NotesApplet::NotesApplet( QWidget *parent, const char *name ) | 431 | NotesApplet::NotesApplet( QWidget *parent, const char *name ) |
463 | : QWidget( parent, name ) { | 432 | : QWidget( parent, name ) { |
464 | setFixedHeight( 18 ); | 433 | setFixedHeight( AppLnk::smallIconSize() ); |
465 | setFixedWidth( 14 ); | 434 | setFixedWidth( AppLnk::smallIconSize() ); |
435 | notesPixmap.convertFromImage( Resource::loadImage( "edit" ).smoothScale( height(), width() ) ); | ||
466 | vc = new NotesControl; | 436 | vc = new NotesControl; |
467 | } | 437 | } |
468 | 438 | ||
469 | NotesApplet::~NotesApplet() { | 439 | NotesApplet::~NotesApplet() { |
470 | delete vc; | 440 | delete vc; |
471 | } | 441 | } |
@@ -505,12 +475,12 @@ void NotesApplet::mousePressEvent( QMouseEvent *) { | |||
505 | vc->view->setFocus(); | 475 | vc->view->setFocus(); |
506 | } | 476 | } |
507 | } | 477 | } |
508 | 478 | ||
509 | void NotesApplet::paintEvent( QPaintEvent* ) { | 479 | void NotesApplet::paintEvent( QPaintEvent* ) { |
510 | QPainter p(this); | 480 | QPainter p(this); |
511 | p.drawPixmap( 0, 1, ( const char** ) notes_xpm ); | 481 | p.drawPixmap( 0, 2, notesPixmap ); |
512 | } | 482 | } |
513 | 483 | ||
514 | 484 | ||
515 | EXPORT_OPIE_APPLET_v1( NotesApplet ) | 485 | EXPORT_OPIE_APPLET_v1( NotesApplet ) |
516 | 486 | ||