summaryrefslogtreecommitdiff
path: root/core/launcher/inputmethods.cpp
authormickeyl <mickeyl>2003-10-02 15:53:52 (UTC)
committer mickeyl <mickeyl>2003-10-02 15:53:52 (UTC)
commit4c9bda8027049b7ea423471a213eca2068490b08 (patch) (side-by-side diff)
treea2400c2a77847764cd09e4c882caf521e503a423 /core/launcher/inputmethods.cpp
parent4dd842eacb6c04303932e4cbebedff14db7cbc87 (diff)
downloadopie-4c9bda8027049b7ea423471a213eca2068490b08.zip
opie-4c9bda8027049b7ea423471a213eca2068490b08.tar.gz
opie-4c9bda8027049b7ea423471a213eca2068490b08.tar.bz2
Start with some customization bits for inputmethods as part of the
BigScreen initiative. You can now choose to have free floating and resizable inputmethods. Two outstanding things: 1.) Hiding the inputmethod via the [x] button confuses the show/hide toggle button. 2.) The new size and position of a moved/resized inputmethod should be remembered.
Diffstat (limited to 'core/launcher/inputmethods.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/inputmethods.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/core/launcher/inputmethods.cpp b/core/launcher/inputmethods.cpp
index f0d8294..d89a366 100644
--- a/core/launcher/inputmethods.cpp
+++ b/core/launcher/inputmethods.cpp
@@ -68,12 +68,6 @@ static const char * tri_xpm[]={
".........",
"........."};
-static const int inputWidgetStyle = QWidget::WStyle_Customize |
- QWidget::WStyle_Tool |
- QWidget::WStyle_StaysOnTop |
- QWidget::WGroupLeader;
-
-
int InputMethod::operator <(const InputMethod& o) const
{
return name() < o.name();
@@ -104,6 +98,12 @@ InputMethods::InputMethods( QWidget *parent ) :
QWidget( parent, "InputMethods", WStyle_Tool | WStyle_Customize ),
mkeyboard(0), imethod(0)
{
+ Config cfg( "Launcher" );
+ cfg.setGroup( "InputMethods" );
+ inputWidgetStyle = QWidget::WStyle_Customize | QWidget::WStyle_StaysOnTop | QWidget::WGroupLeader;
+ inputWidgetStyle |= cfg.readBoolEntry( "Float", false ) ? QWidget::WStyle_DialogBorder : QWidget::WStyle_Tool;
+ inputWidgetWidth = cfg.readNumEntry( "Width", 100 );
+
setBackgroundMode( PaletteBackground );
QHBoxLayout *hbox = new QHBoxLayout( this );
@@ -537,7 +537,7 @@ void InputMethods::showKbd( bool on )
// HACK... Make the texteditor fit with all input methods
// Input methods should also never use more than about 40% of the screen
int height = QMIN( mkeyboard->widget->sizeHint().height(), 134 );
- mkeyboard->widget->resize( qApp->desktop()->width(), height );
+ mkeyboard->widget->resize( qApp->desktop()->width() * (inputWidgetWidth*0.01), height );
mkeyboard->widget->move( 0, mapToGlobal( QPoint() ).y() - height );
mkeyboard->widget->show();
} else {