src/configDialog.cc

changeset 855
e16f1587ef44
parent 851
dbed6938238c
child 860
a496e72af069
equal deleted inserted replaced
854:403affd33c6e 855:e16f1587ef44
292 value = _buttonColors[button]; 292 value = _buttonColors[button];
293 else 293 else
294 print ("Unknown widget of type %1\n", wdg->metaObject()->className()); 294 print ("Unknown widget of type %1\n", wdg->metaObject()->className());
295 295
296 conf->loadFromVariant (value); 296 conf->loadFromVariant (value);
297 print ("Value of %1: %2\n", conf->name(), conf->toVariant().toString());
297 }); 298 });
298 299
299 // Rebuild the quick color toolbar 300 // Rebuild the quick color toolbar
300 g_win->setQuickColors (quickColors); 301 g_win->setQuickColors (quickColors);
301 cfg::QuickColorToolbar = quickColorString(); 302 cfg::QuickColorToolbar = quickColorString();
507 { 508 {
508 print ("setButtonColor: null sender!\n"); 509 print ("setButtonColor: null sender!\n");
509 return; 510 return;
510 } 511 }
511 512
513 print ("Color of %1 is %2\n", button, _buttonColors[button].name());
512 QColor col = QColorDialog::getColor (_buttonColors[button]); 514 QColor col = QColorDialog::getColor (_buttonColors[button]);
513 515
514 if (col.isValid()) 516 if (col.isValid())
515 { 517 {
516 int r = col.red(); 518 int r = col.red();
530 { 532 {
531 button->setIcon (getIcon ("colorselect")); 533 button->setIcon (getIcon ("colorselect"));
532 button->setAutoFillBackground (true); 534 button->setAutoFillBackground (true);
533 button->setStyleSheet (format ("background-color: %1", value)); 535 button->setStyleSheet (format ("background-color: %1", value));
534 _buttonColors[button] = QColor (value); 536 _buttonColors[button] = QColor (value);
537 print ("Color of %1 set to %2\n", button, value);
535 } 538 }
536 539
537 // 540 //
538 // Finds the given list widget item in the list of widget items given. 541 // Finds the given list widget item in the list of widget items given.
539 // 542 //

mercurial