summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/inputmethods.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/launcher/inputmethods.cpp b/core/launcher/inputmethods.cpp
index 765dfe9..09b9a83 100644
--- a/core/launcher/inputmethods.cpp
+++ b/core/launcher/inputmethods.cpp
@@ -275,33 +275,37 @@ void InputMethods::chooseMethod(InputMethod* im)
275 kbdButton->setOn( TRUE ); 275 kbdButton->setOn( TRUE );
276 else 276 else
277 showKbd( TRUE ); 277 showKbd( TRUE );
278} 278}
279 279
280 280
281void InputMethods::showKbd( bool on ) 281void InputMethods::showKbd( bool on )
282{ 282{
283 if ( !method ) 283 if ( !method )
284 return; 284 return;
285 285
286 if ( on ) { 286 if ( on ) {
287 method->interface->resetState(); 287 method->interface->resetState();
288 // HACK... Make the texteditor fit with all input methods 288 // HACK... Make the texteditor fit with all input methods
289 // Input methods should also never use more than about 40% of the screen 289 // Input methods should also never use more than about 40% of the screen
290 int height = QMIN( method->widget->sizeHint().height(), 134 ); 290 int height = QMIN( method->widget->sizeHint().height(), 134 );
291 #ifdef QT_QWS_SIMPAD
292 method->widget->resize( qApp->desktop()->width() / 2, height ); // make it half the width on the SIMpad
293 #else
291 method->widget->resize( qApp->desktop()->width(), height ); 294 method->widget->resize( qApp->desktop()->width(), height );
295 #endif
292 method->widget->move( 0, mapToGlobal( QPoint() ).y() - height ); 296 method->widget->move( 0, mapToGlobal( QPoint() ).y() - height );
293 method->widget->show(); 297 method->widget->show();
294 } else { 298 } else {
295 method->widget->hide(); 299 method->widget->hide();
296 } 300 }
297 301
298 emit inputToggled( on ); 302 emit inputToggled( on );
299} 303}
300 304
301bool InputMethods::shown() const 305bool InputMethods::shown() const
302{ 306{
303 return method && method->widget->isVisible(); 307 return method && method->widget->isVisible();
304} 308}
305 309
306QString InputMethods::currentShown() const 310QString InputMethods::currentShown() const
307{ 311{