-rw-r--r-- | core/launcher/inputmethods.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/core/launcher/inputmethods.cpp b/core/launcher/inputmethods.cpp index 7e99796..586628b 100644 --- a/core/launcher/inputmethods.cpp +++ b/core/launcher/inputmethods.cpp | |||
@@ -68,42 +68,46 @@ int InputMethod::operator >(const InputMethod& o) const | |||
68 | return name() > o.name(); | 68 | return name() > o.name(); |
69 | } | 69 | } |
70 | int InputMethod::operator <=(const InputMethod& o) const | 70 | int InputMethod::operator <=(const InputMethod& o) const |
71 | { | 71 | { |
72 | return name() <= o.name(); | 72 | return name() <= o.name(); |
73 | } | 73 | } |
74 | 74 | ||
75 | 75 | ||
76 | /* | 76 | /* |
77 | Slightly hacky: We use WStyle_Tool as a flag to say "this widget | 77 | Slightly hacky: We use WStyle_Tool as a flag to say "this widget |
78 | belongs to the IM system, so clicking it should not cause a reset". | 78 | belongs to the IM system, so clicking it should not cause a reset". |
79 | */ | 79 | */ |
80 | class IMToolButton : public QToolButton | 80 | class IMToolButton : public QToolButton |
81 | { | 81 | { |
82 | public: | 82 | public: |
83 | IMToolButton::IMToolButton( QWidget *parent ) : QToolButton( parent ) | 83 | IMToolButton::IMToolButton( QWidget *parent ) : QToolButton( parent ) |
84 | { setWFlags( WStyle_Tool ); } | 84 | { setWFlags( WStyle_Tool ); |
85 | setBackgroundOrigin( ParentOrigin ); | ||
86 | setBackgroundMode( PaletteBackground ); | ||
87 | } | ||
85 | }; | 88 | }; |
86 | 89 | ||
87 | 90 | ||
88 | InputMethods::InputMethods( QWidget *parent ) : | 91 | InputMethods::InputMethods( QWidget *parent ) : |
89 | QWidget( parent, "InputMethods", WStyle_Tool | WStyle_Customize ), | 92 | QWidget( parent, "InputMethods", WStyle_Tool | WStyle_Customize ), |
90 | mkeyboard(0), imethod(0) | 93 | mkeyboard(0), imethod(0) |
91 | { | 94 | { |
92 | readConfig(); | 95 | readConfig(); |
93 | 96 | ||
97 | setBackgroundOrigin( ParentOrigin ); | ||
94 | setBackgroundMode( PaletteBackground ); | 98 | setBackgroundMode( PaletteBackground ); |
95 | QHBoxLayout *hbox = new QHBoxLayout( this ); | 99 | QHBoxLayout *hbox = new QHBoxLayout( this ); |
96 | 100 | ||
97 | kbdButton = new IMToolButton( this); | 101 | kbdButton = new IMToolButton( this); |
98 | kbdButton->setFocusPolicy(NoFocus); | 102 | kbdButton->setFocusPolicy(NoFocus); |
99 | kbdButton->setToggleButton( TRUE ); | 103 | kbdButton->setToggleButton( TRUE ); |
100 | if (parent->sizeHint().height() > 0) | 104 | if (parent->sizeHint().height() > 0) |
101 | kbdButton->setFixedHeight( parent->sizeHint().height() ); | 105 | kbdButton->setFixedHeight( parent->sizeHint().height() ); |
102 | kbdButton->setFixedWidth( 32 ); | 106 | kbdButton->setFixedWidth( 32 ); |
103 | kbdButton->setAutoRaise( TRUE ); | 107 | kbdButton->setAutoRaise( TRUE ); |
104 | kbdButton->setUsesBigPixmap( TRUE ); | 108 | kbdButton->setUsesBigPixmap( TRUE ); |
105 | hbox->addWidget( kbdButton ); | 109 | hbox->addWidget( kbdButton ); |
106 | connect( kbdButton, SIGNAL(toggled(bool)), this, SLOT(showKbd(bool)) ); | 110 | connect( kbdButton, SIGNAL(toggled(bool)), this, SLOT(showKbd(bool)) ); |
107 | 111 | ||
108 | kbdChoice = new IMToolButton( this ); | 112 | kbdChoice = new IMToolButton( this ); |
109 | kbdChoice->setFocusPolicy(NoFocus); | 113 | kbdChoice->setFocusPolicy(NoFocus); |