summaryrefslogtreecommitdiff
authorhash <hash>2002-08-22 16:30:01 (UTC)
committer hash <hash>2002-08-22 16:30:01 (UTC)
commit4b0db964f77e4b3caa1f95ea753c89094b86e0d6 (patch) (unidiff)
tree1be74ef5d6bf3101815b5ecdafb21c0db470715e
parent8503abdc93f6f3ce93cee0f1176faa919dbd04f5 (diff)
downloadopie-4b0db964f77e4b3caa1f95ea753c89094b86e0d6.zip
opie-4b0db964f77e4b3caa1f95ea753c89094b86e0d6.tar.gz
opie-4b0db964f77e4b3caa1f95ea753c89094b86e0d6.tar.bz2
xpm images now are the same color as the text
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--inputmethods/multikey/keyboard.cpp19
-rw-r--r--inputmethods/multikey/keyboard.h6
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)
179 179
180 QPixmap *pix = keys->pix(row,col); 180 QImage *pix = keys->pix(row,col);
181 181
@@ -197,3 +197,3 @@ void Keyboard::drawKeyboard(QPainter &p, int row, int col)
197 // center the image in the middle of the key 197 // center the image in the middle of the key
198 p.drawPixmap( x + (defaultKeyWidth * keyWidth - pix->width())/2, 198 p.drawImage( x + (defaultKeyWidth * keyWidth - pix->width())/2,
199 y + (keyHeight - pix->height())/2 + 1, 199 y + (keyHeight - pix->height())/2 + 1,
@@ -221,3 +221,3 @@ void Keyboard::drawKeyboard(QPainter &p, int row, int col)
221 221
222 QPixmap *pix = keys->pix(row, col); 222 QImage *pix = keys->pix(row, col);
223 int keyWidth = keys->width(row, col); 223 int keyWidth = keys->width(row, col);
@@ -246,5 +246,6 @@ void Keyboard::drawKeyboard(QPainter &p, int row, int col)
246 // center the image in the middle of the key 246 // center the image in the middle of the key
247 p.drawPixmap( x + (keyWidthPix - pix->width())/2, 247 pix->setColor(1, textcolor.rgb());
248 p.drawImage( x + (keyWidthPix - pix->width())/2,
248 y + (keyHeight - pix->height())/2 + 1, 249 y + (keyHeight - pix->height())/2 + 1,
249 QPixmap(*pix) ); 250 QImage(*pix) );
250 } 251 }
@@ -1046,3 +1047,3 @@ void Keys::setKeysFromFile(const char * filename) {
1046 char * xpm[256]; //couldnt be larger than that... could it? 1047 char * xpm[256]; //couldnt be larger than that... could it?
1047 QPixmap *xpm2pix = 0; 1048 QImage *xpm2pix = 0;
1048 1049
@@ -1092,3 +1093,3 @@ void Keys::setKeysFromFile(const char * filename) {
1092 1093
1093 xpm2pix = new QPixmap((const char **)xpm); 1094 xpm2pix = new QImage((const char **)xpm);
1094 for (int i = 0; i < xpmLineCount; i++) 1095 for (int i = 0; i < xpmLineCount; i++)
@@ -1161,3 +1162,3 @@ void Keys::setKeysFromFile(const char * filename) {
1161void Keys::setKey(const int row, const int qcode, const ushort unicode, 1162void Keys::setKey(const int row, const int qcode, const ushort unicode,
1162 const int width, QPixmap *pix) { 1163 const int width, QImage *pix) {
1163 1164
@@ -1218,3 +1219,3 @@ int Keys::qcode(const int row, const int col) {
1218 1219
1219QPixmap *Keys::pix(const int row, const int col) { 1220QImage *Keys::pix(const int row, const int col) {
1220 1221
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:
65 ushort meta(const ushort); 65 ushort meta(const ushort);
66 QPixmap *pix(const int row, const int col); 66 QImage *pix(const int row, const int col);
67 int numKeys(const int row); 67 int numKeys(const int row);
@@ -69,3 +69,3 @@ public:
69 void setKey(const int row, const int qcode, const ushort unicode, 69 void setKey(const int row, const int qcode, const ushort unicode,
70 const int width, QPixmap *pix); 70 const int width, QImage *pix);
71 void setPressed(const int row, const int col, const bool pressed); 71 void setPressed(const int row, const int col, const bool pressed);
@@ -83,3 +83,3 @@ private:
83 bool *pressed; 83 bool *pressed;
84 QPixmap *pix; 84 QImage *pix;
85 }; 85 };