summaryrefslogtreecommitdiffstats
path: root/src/MainWidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/MainWidget.cpp')
-rw-r--r--src/MainWidget.cpp30
1 files changed, 23 insertions, 7 deletions
diff --git a/src/MainWidget.cpp b/src/MainWidget.cpp
index ff7dc62..ee9c1df 100644
--- a/src/MainWidget.cpp
+++ b/src/MainWidget.cpp
@@ -511,27 +511,27 @@ MainWidget::MainWidget ( TDEAboutData *about, bool tren, TQWidget *parent, const
{
tray = new KbdTray ( this );
tray->setPixmap ( UserIcon ( "tray" ) );
-
+
TDEConfig *cfg = TDEApplication::kApplication()->config();
-
+
TDEPopupMenu *m = tray->contextMenu();
m->setCheckable ( true );
-
+
KHelpMenu *h = new KHelpMenu ( tray, about );
m->insertItem ( "Font ...", this, TQT_SLOT ( chooseFont() ) );
mnu_autores = m->insertItem( "Auto resize font",this, TQT_SLOT ( toggleFontAutoRes() ) );
bool fnt_autores = cfg->readBoolEntry("autoresfont",true);
m->setItemChecked(mnu_autores, fnt_autores);
-
+
m->insertItem ( i18n ("Background color"), this, TQT_SLOT ( chooseBackgroundColor() ) );
- m->insertItem ( i18n ("Keys color (requires restart)"), this, TQT_SLOT ( chooseKeysColor() ) );
+ m->insertItem ( i18n ("Keys color"), this, TQT_SLOT ( chooseKeysColor() ) );
m->insertSeparator();
mnu_dock = m->insertItem ( "Dock widget", this, TQT_SLOT ( showDock() ) );
bool show_dock = cfg->readBoolEntry("showdock",false);
m->setItemChecked(mnu_dock, show_dock);
-
+
mnu_lock = m->insertItem(i18n("Lock on screen"), this, TQT_SLOT(toggleLock()));
locked = cfg->readBoolEntry("locked", false);
m->setItemChecked(mnu_lock, locked);
@@ -597,7 +597,23 @@ void MainWidget::chooseKeysColor()
{
cfg->writeEntry("keysColor", newkeysC.name()); // save as #rrbbgg
cfg->sync();
- // can't set PaletteBackgroundColor because it's in VButton::VButton - needs restart to read configuration entry
+
+ for (unsigned idx = 0; idx < btns.size(); ++idx)
+ {
+ btns[idx]->setColor(newkeysC);
+ }
+ for (unsigned idx = 0; idx < mod_keys.size(); ++idx)
+ {
+ mod_keys[idx]->setColor(newkeysC);
+ }
+ for (unsigned idx = 0; idx < other_keys.size(); ++idx)
+ {
+ other_keys[idx]->setColor(newkeysC);
+ }
+ for (unsigned idx = 0; idx < numl_keys.size(); ++idx)
+ {
+ numl_keys[idx]->setColor(newkeysC);
+ }
}
}