summaryrefslogtreecommitdiff
authorzecke <zecke>2004-09-13 14:49:52 (UTC)
committer zecke <zecke>2004-09-13 14:49:52 (UTC)
commit114abd0387d34bb0a160059d7799c4fbece63e78 (patch) (side-by-side diff)
tree8294e4fd9608cb9110a7d747edcd528713476cfe
parent2e896a0d3d5b18a160c5cc468bee5ed129a92320 (diff)
downloadopie-114abd0387d34bb0a160059d7799c4fbece63e78.zip
opie-114abd0387d34bb0a160059d7799c4fbece63e78.tar.gz
opie-114abd0387d34bb0a160059d7799c4fbece63e78.tar.bz2
Try to use the Parent Background as BackgroundOrigin
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/inputmethods.cpp6
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
@@ -60,58 +60,62 @@ static const char * tri_xpm[]={
"........."};
int InputMethod::operator <(const InputMethod& o) const
{
return name() < o.name();
}
int InputMethod::operator >(const InputMethod& o) const
{
return name() > o.name();
}
int InputMethod::operator <=(const InputMethod& o) const
{
return name() <= o.name();
}
/*
Slightly hacky: We use WStyle_Tool as a flag to say "this widget
belongs to the IM system, so clicking it should not cause a reset".
*/
class IMToolButton : public QToolButton
{
public:
IMToolButton::IMToolButton( QWidget *parent ) : QToolButton( parent )
- { setWFlags( WStyle_Tool ); }
+ { setWFlags( WStyle_Tool );
+ setBackgroundOrigin( ParentOrigin );
+ setBackgroundMode( PaletteBackground );
+ }
};
InputMethods::InputMethods( QWidget *parent ) :
QWidget( parent, "InputMethods", WStyle_Tool | WStyle_Customize ),
mkeyboard(0), imethod(0)
{
readConfig();
+ setBackgroundOrigin( ParentOrigin );
setBackgroundMode( PaletteBackground );
QHBoxLayout *hbox = new QHBoxLayout( this );
kbdButton = new IMToolButton( this);
kbdButton->setFocusPolicy(NoFocus);
kbdButton->setToggleButton( TRUE );
if (parent->sizeHint().height() > 0)
kbdButton->setFixedHeight( parent->sizeHint().height() );
kbdButton->setFixedWidth( 32 );
kbdButton->setAutoRaise( TRUE );
kbdButton->setUsesBigPixmap( TRUE );
hbox->addWidget( kbdButton );
connect( kbdButton, SIGNAL(toggled(bool)), this, SLOT(showKbd(bool)) );
kbdChoice = new IMToolButton( this );
kbdChoice->setFocusPolicy(NoFocus);
kbdChoice->setPixmap( QPixmap( (const char **)tri_xpm ) );
if (parent->sizeHint().height() > 0)
kbdChoice->setFixedHeight( parent->sizeHint().height() );
kbdChoice->setFixedWidth( 13 );
kbdChoice->setAutoRaise( TRUE );
hbox->addWidget( kbdChoice );
connect( kbdChoice, SIGNAL(clicked()), this, SLOT(chooseKbd()) );