summaryrefslogtreecommitdiffabout
path: root/microkde/kcolordialog.cpp
Side-by-side diff
Diffstat (limited to 'microkde/kcolordialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kcolordialog.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/microkde/kcolordialog.cpp b/microkde/kcolordialog.cpp
index 9a76e5e..a3d8973 100644
--- a/microkde/kcolordialog.cpp
+++ b/microkde/kcolordialog.cpp
@@ -62,31 +62,32 @@ KColorDialog::KColorDialog( QWidget *p ):QDialog( p, "input-dialog", true )
lay->addWidget(lg ,3,0 );
g = new QSlider ( 0, 255, 1, 1, Horizontal, this );
lay->addWidget( g ,3,1 );
QLabel* lb = new QLabel ( "Blue:",this );
lay->addWidget( lb,4,0 );
b = new QSlider ( 0, 255, 1, 1, Horizontal, this );
lay->addWidget(b ,4,1 );
QColor d = backgroundColor();
r->setValue(d.red() );
g->setValue(d.green() );
b->setValue(d.blue() );
old_color->setPalette( QPalette( d.dark() , d ) );
// kannst du wieder reinnehmen, aber es geht auch so.
QPushButton * ok = new QPushButton (i18n(" OK "), this );
+ ok->setDefault( true );
QPushButton * cancel = new QPushButton (i18n(" Cancel "), this );
lay->addWidget(ok ,5,0 );
lay->addWidget(cancel ,5,1 );
connect (ok, SIGNAL( clicked() ), this ,SLOT (accept() ));
connect (cancel, SIGNAL( clicked() ), this ,SLOT (reject() ));
connect (r, SIGNAL( valueChanged ( int ) ), this ,SLOT (updateColor( int ) ));
connect (g, SIGNAL( valueChanged ( int ) ), this ,SLOT (updateColor( int ) ));
connect (b, SIGNAL( valueChanged ( int ) ), this ,SLOT (updateColor( int ) ));
}
void KColorDialog::updateColor( int )
{
QColor c = getColor( ) ;
new_color->setPalette( QPalette( c.dark(), c ) );
}