author | hash <hash> | 2002-08-22 08:09:57 (UTC) |
---|---|---|
committer | hash <hash> | 2002-08-22 08:09:57 (UTC) |
commit | 2ff3290b552c575ff7222df29235651968f484aa (patch) (unidiff) | |
tree | 15819ac788483336b90ececf5f5f635081c98c97 | |
parent | 8eee5a5dc6a43ed3cdd77095c3a91128fe76589e (diff) | |
download | opie-2ff3290b552c575ff7222df29235651968f484aa.zip opie-2ff3290b552c575ff7222df29235651968f484aa.tar.gz opie-2ff3290b552c575ff7222df29235651968f484aa.tar.bz2 |
coloring problem
-rw-r--r-- | inputmethods/multikey/keyboard.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/inputmethods/multikey/keyboard.cpp b/inputmethods/multikey/keyboard.cpp index 89937cf..e3d3928 100644 --- a/inputmethods/multikey/keyboard.cpp +++ b/inputmethods/multikey/keyboard.cpp | |||
@@ -228,20 +228,21 @@ void Keyboard::drawKeyboard(QPainter &p, int row, int col) | |||
228 | if (keys->pressed(row, col)) | 228 | if (keys->pressed(row, col)) |
229 | p.fillRect(x+1, y+1, keyWidthPix - 1, | 229 | p.fillRect(x+1, y+1, keyWidthPix - 1, |
230 | keyHeight - 1, keycolor_pressed); | 230 | keyHeight - 1, keycolor_pressed); |
231 | 231 | ||
232 | ushort c = keys->uni(row, col); | 232 | ushort c = keys->uni(row, col); |
233 | 233 | ||
234 | p.setPen(textcolor); | ||
234 | if (!pix) { | 235 | if (!pix) { |
235 | if ((shift || lock) && keys->shift(c)) | 236 | if ((shift || lock) && keys->shift(c)) |
236 | c = keys->shift(c); | 237 | c = keys->shift(c); |
237 | else if (meta && keys->meta(c)) | 238 | else if (meta && keys->meta(c)) |
238 | c = keys->meta(c); | 239 | c = keys->meta(c); |
239 | 240 | ||
240 | p.drawText(x, y, | 241 | p.drawText(x, y, |
241 | defaultKeyWidth * keyWidth + 3, keyHeight, | 242 | keyWidthPix + 3, keyHeight, |
242 | AlignCenter, (QChar)c); | 243 | AlignCenter, (QChar)c); |
243 | } | 244 | } |
244 | else { | 245 | else { |
245 | // center the image in the middle of the key | 246 | // center the image in the middle of the key |
246 | p.drawPixmap( x + (keyWidthPix - pix->width())/2, | 247 | p.drawPixmap( x + (keyWidthPix - pix->width())/2, |
247 | y + (keyHeight - pix->height())/2 + 1, | 248 | y + (keyHeight - pix->height())/2 + 1, |
@@ -253,12 +254,13 @@ void Keyboard::drawKeyboard(QPainter &p, int row, int col) | |||
253 | 254 | ||
254 | x += keyWidthPix; | 255 | x += keyWidthPix; |
255 | } | 256 | } |
256 | 257 | ||
257 | 258 | ||
258 | } | 259 | } |
260 | p.setPen(keycolor_lines); | ||
259 | p.drawLine(0, height() - 1, width(), height() - 1); | 261 | p.drawLine(0, height() - 1, width(), height() - 1); |
260 | p.drawLine(width() - 1, 0, width() - 1, height()); | 262 | p.drawLine(width() - 1, 0, width() - 1, height()); |
261 | } | 263 | } |
262 | 264 | ||
263 | } | 265 | } |
264 | 266 | ||