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/multikey/keyboard.cpp | |
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
Diffstat (limited to 'inputmethods/multikey/keyboard.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | inputmethods/multikey/keyboard.cpp | 19 |
1 files changed, 10 insertions, 9 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) { |