-rw-r--r-- | inputmethods/multikey/configdlg.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/inputmethods/multikey/configdlg.cpp b/inputmethods/multikey/configdlg.cpp index 9ea59a4..9576579 100644 --- a/inputmethods/multikey/configdlg.cpp +++ b/inputmethods/multikey/configdlg.cpp @@ -143,72 +143,72 @@ ConfigDlg::ConfigDlg () : QTabWidget () QGrid *color_box = new QGrid(2, this); color_box->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed)); color_box->setMargin(3); color_box->setSpacing(3); addTab(color_box, tr("Colors")); QLabel *label; QStringList color; config.setGroup("colors"); label = new QLabel(tr("Key Color"), color_box); keycolor_button = new QPushButton(color_box); connect(keycolor_button, SIGNAL(clicked()), SLOT(keyColorClicked())); keycolor_button->setFlat((bool)1); color = config.readListEntry("keycolor", QChar(',')); /* * hopefully not required if (color.isEmpty()) { color = QStringList::split(",", "240,240,240"); config.writeEntry("keycolor", color.join(",")); } */ - keycolor_button->setBackgroundColor(QColor(color[0].toInt(), color[1].toInt(), color[2].toInt())); + keycolor_button->setPalette(QPalette(QColor(color[0].toInt(), color[1].toInt(), color[2].toInt()))); label = new QLabel(tr("Key Pressed Color"), color_box); keycolor_pressed_button = new QPushButton(color_box); connect(keycolor_pressed_button, SIGNAL(clicked()), SLOT(keyColorPressedClicked())); keycolor_pressed_button->setFlat((bool)1); color = config.readListEntry("keycolor_pressed", QChar(',')); - keycolor_pressed_button->setBackgroundColor(QColor(color[0].toInt(), color[1].toInt(), color[2].toInt())); + keycolor_pressed_button->setPalette(QPalette((QColor(color[0].toInt(), color[1].toInt(), color[2].toInt())))); label = new QLabel(tr("Line Color"), color_box); keycolor_lines_button = new QPushButton(color_box); connect(keycolor_lines_button, SIGNAL(clicked()), SLOT(keyColorLinesClicked())); keycolor_lines_button->setFlat((bool)1); color = config.readListEntry("keycolor_lines", QChar(',')); - keycolor_lines_button->setBackgroundColor(QColor(color[0].toInt(), color[1].toInt(), color[2].toInt())); + keycolor_lines_button->setPalette(QPalette((QColor(color[0].toInt(), color[1].toInt(), color[2].toInt())))); label = new QLabel(tr("Text Color"), color_box); textcolor_button = new QPushButton(color_box); connect(textcolor_button, SIGNAL(clicked()), SLOT(textColorClicked())); textcolor_button->setFlat((bool)1); color = config.readListEntry("textcolor", QChar(',')); - textcolor_button->setBackgroundColor(QColor(color[0].toInt(), color[1].toInt(), color[2].toInt())); + textcolor_button->setPalette(QPalette((QColor(color[0].toInt(), color[1].toInt(), color[2].toInt())))); label = new QLabel("", color_box); // a spacer so the above buttons dont expand label->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding)); } void ConfigDlg::pickTog() { Config config ("multikey"); config.setGroup ("general"); config.writeEntry ("usePickboard", pick_button->isChecked()); // default closed emit pickboardToggled(pick_button->isChecked()); } void ConfigDlg::repeatTog() { Config config ("multikey"); config.setGroup ("general"); config.writeEntry ("useRepeat", repeat_button->isChecked()); // default closed emit repeatToggled(repeat_button->isChecked()); } |