-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 | |||
@@ -24,6 +24,7 @@ | |||
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 | ||
@@ -48,38 +49,6 @@ using namespace Opie::Ui; | |||
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 ) |
@@ -461,8 +430,9 @@ void NotesControl::slotSearch() { | |||
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 | ||
@@ -508,7 +478,7 @@ void NotesApplet::mousePressEvent( QMouseEvent *) { | |||
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 | ||