Diffstat (limited to 'noncore/apps/opie-console/function_keyboard.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/function_keyboard.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/apps/opie-console/function_keyboard.cpp b/noncore/apps/opie-console/function_keyboard.cpp index fa11701..3da8d61 100644 --- a/noncore/apps/opie-console/function_keyboard.cpp +++ b/noncore/apps/opie-console/function_keyboard.cpp | |||
@@ -95,17 +95,17 @@ void FunctionKeyboard::paintEvent(QPaintEvent *e) { | |||
95 | if (keys[handle].pixFile.isEmpty()) | 95 | if (keys[handle].pixFile.isEmpty()) |
96 | p.drawText( c * keyWidth + 1, r * keyHeight + 1, | 96 | p.drawText( c * keyWidth + 1, r * keyHeight + 1, |
97 | keyWidth, keyHeight, | 97 | keyWidth, keyHeight, |
98 | Qt::AlignHCenter | Qt::AlignVCenter, | 98 | Qt::AlignHCenter | Qt::AlignVCenter, |
99 | keys[handle].label | 99 | keys[handle].label |
100 | ); | 100 | ); |
101 | else { | 101 | else { |
102 | 102 | ||
103 | ushort centerX = c *keyWidth + (keyWidth - keys[handle].pix->width()) / 2; | 103 | ushort centerX = (ushort)(c *keyWidth) + (ushort)(keyWidth - keys[handle].pix->width()) / 2; |
104 | ushort centerY = r * keyHeight + (keyHeight - keys[handle].pix->height()) / 2; | 104 | ushort centerY = r * keyHeight + (keyHeight - keys[handle].pix->height()) / 2; |
105 | p.drawPixmap(centerX, centerY, *keys[handle].pix); | 105 | p.drawPixmap(centerX, centerY, *keys[handle].pix); |
106 | } | 106 | } |
107 | } | 107 | } |
108 | } | 108 | } |
109 | } | 109 | } |
110 | } | 110 | } |
111 | 111 | ||
@@ -122,17 +122,17 @@ void FunctionKeyboard::paintKey(uint row, uint col) { | |||
122 | p.drawText( | 122 | p.drawText( |
123 | col * keyWidth + 1, row * keyHeight + 1, | 123 | col * keyWidth + 1, row * keyHeight + 1, |
124 | keyWidth, keyHeight, | 124 | keyWidth, keyHeight, |
125 | Qt::AlignHCenter | Qt::AlignVCenter, | 125 | Qt::AlignHCenter | Qt::AlignVCenter, |
126 | keys[handle].label | 126 | keys[handle].label |
127 | ); | 127 | ); |
128 | else { | 128 | else { |
129 | 129 | ||
130 | ushort centerX = col *keyWidth + (keyWidth - keys[handle].pix->width()) / 2; | 130 | ushort centerX = (ushort)(col *keyWidth) + (ushort)(keyWidth - keys[handle].pix->width()) / 2; |
131 | ushort centerY = row * keyHeight + (keyHeight - keys[handle].pix->height()) / 2; | 131 | ushort centerY = row * keyHeight + (keyHeight - keys[handle].pix->height()) / 2; |
132 | p.drawPixmap(centerX, centerY, *keys[handle].pix); | 132 | p.drawPixmap(centerX, centerY, *keys[handle].pix); |
133 | } | 133 | } |
134 | 134 | ||
135 | if (col == numCols - 1) { | 135 | if (col == numCols - 1) { |
136 | 136 | ||
137 | // sometimes it doesnt draw the last line | 137 | // sometimes it doesnt draw the last line |
138 | 138 | ||