author | hash <hash> | 2002-08-22 16:30:01 (UTC) |
---|---|---|
committer | hash <hash> | 2002-08-22 16:30:01 (UTC) |
commit | 4b0db964f77e4b3caa1f95ea753c89094b86e0d6 (patch) (side-by-side diff) | |
tree | 1be74ef5d6bf3101815b5ecdafb21c0db470715e /inputmethods | |
parent | 8503abdc93f6f3ce93cee0f1176faa919dbd04f5 (diff) | |
download | opie-4b0db964f77e4b3caa1f95ea753c89094b86e0d6.zip opie-4b0db964f77e4b3caa1f95ea753c89094b86e0d6.tar.gz opie-4b0db964f77e4b3caa1f95ea753c89094b86e0d6.tar.bz2 |
xpm images now are the same color as the text
-rw-r--r-- | inputmethods/multikey/keyboard.cpp | 19 | ||||
-rw-r--r-- | inputmethods/multikey/keyboard.h | 6 |
2 files changed, 13 insertions, 12 deletions
diff --git a/inputmethods/multikey/keyboard.cpp b/inputmethods/multikey/keyboard.cpp index e3d3928..3f6f73b 100644 --- a/inputmethods/multikey/keyboard.cpp +++ b/inputmethods/multikey/keyboard.cpp @@ -179,3 +179,3 @@ void Keyboard::drawKeyboard(QPainter &p, int row, int col) - QPixmap *pix = keys->pix(row,col); + QImage *pix = keys->pix(row,col); @@ -197,3 +197,3 @@ void Keyboard::drawKeyboard(QPainter &p, int row, int col) // center the image in the middle of the key - p.drawPixmap( x + (defaultKeyWidth * keyWidth - pix->width())/2, + p.drawImage( x + (defaultKeyWidth * keyWidth - pix->width())/2, y + (keyHeight - pix->height())/2 + 1, @@ -221,3 +221,3 @@ void Keyboard::drawKeyboard(QPainter &p, int row, int col) - QPixmap *pix = keys->pix(row, col); + QImage *pix = keys->pix(row, col); int keyWidth = keys->width(row, col); @@ -246,5 +246,6 @@ void Keyboard::drawKeyboard(QPainter &p, int row, int col) // center the image in the middle of the key - p.drawPixmap( x + (keyWidthPix - pix->width())/2, + pix->setColor(1, textcolor.rgb()); + p.drawImage( x + (keyWidthPix - pix->width())/2, y + (keyHeight - pix->height())/2 + 1, - QPixmap(*pix) ); + QImage(*pix) ); } @@ -1046,3 +1047,3 @@ void Keys::setKeysFromFile(const char * filename) { char * xpm[256]; //couldnt be larger than that... could it? - QPixmap *xpm2pix = 0; + QImage *xpm2pix = 0; @@ -1092,3 +1093,3 @@ void Keys::setKeysFromFile(const char * filename) { - xpm2pix = new QPixmap((const char **)xpm); + xpm2pix = new QImage((const char **)xpm); for (int i = 0; i < xpmLineCount; i++) @@ -1161,3 +1162,3 @@ void Keys::setKeysFromFile(const char * filename) { void Keys::setKey(const int row, const int qcode, const ushort unicode, - const int width, QPixmap *pix) { + const int width, QImage *pix) { @@ -1218,3 +1219,3 @@ int Keys::qcode(const int row, const int col) { -QPixmap *Keys::pix(const int row, const int col) { +QImage *Keys::pix(const int row, const int col) { diff --git a/inputmethods/multikey/keyboard.h b/inputmethods/multikey/keyboard.h index b692975..1aa7a35 100644 --- a/inputmethods/multikey/keyboard.h +++ b/inputmethods/multikey/keyboard.h @@ -65,3 +65,3 @@ public: ushort meta(const ushort); - QPixmap *pix(const int row, const int col); + QImage *pix(const int row, const int col); int numKeys(const int row); @@ -69,3 +69,3 @@ public: void setKey(const int row, const int qcode, const ushort unicode, - const int width, QPixmap *pix); + const int width, QImage *pix); void setPressed(const int row, const int col, const bool pressed); @@ -83,3 +83,3 @@ private: bool *pressed; - QPixmap *pix; + QImage *pix; }; |