src/configDialog.cpp

changeset 189
ac2d3e8dd110
parent 186
a130960bb220
child 191
9bb6a17305ad
equal deleted inserted replaced
188:4e686b771996 189:ac2d3e8dd110
287 } 287 }
288 288
289 for (int i = 0; i < g_NumGrids; ++i) { 289 for (int i = 0; i < g_NumGrids; ++i) {
290 // Icon 290 // Icon
291 lb_gridIcons[i] = new QLabel; 291 lb_gridIcons[i] = new QLabel;
292 lb_gridIcons[i]->setPixmap (getIcon (fmt ("grid-%s", str (g_GridInfo[i].name).tolower ().chars ()))); 292 lb_gridIcons[i]->setPixmap (getIcon (fmt ("grid-%s", str (g_GridInfo[i].name).lower ().chars ())));
293 293
294 // Text label 294 // Text label
295 lb_gridLabels[i] = new QLabel (fmt ("%s:", g_GridInfo[i].name)); 295 lb_gridLabels[i] = new QLabel (fmt ("%s:", g_GridInfo[i].name));
296 296
297 QHBoxLayout* labellayout = new QHBoxLayout; 297 QHBoxLayout* labellayout = new QHBoxLayout;
390 390
391 if (col == null) { 391 if (col == null) {
392 item->setText ("[[unknown color]]"); 392 item->setText ("[[unknown color]]");
393 item->setIcon (getIcon ("error")); 393 item->setIcon (getIcon ("error"));
394 } else { 394 } else {
395 item->setText (col->zName); 395 item->setText (col->name);
396 item->setIcon (makeColorIcon (col, 16)); 396 item->setIcon (makeColorIcon (col, 16));
397 } 397 }
398 } 398 }
399 399
400 lw_quickColors->addItem (item); 400 lw_quickColors->addItem (item);
425 425
426 if (entry->bSeparator == true) 426 if (entry->bSeparator == true)
427 return; // don't color separators 427 return; // don't color separators
428 } 428 }
429 429
430 short dDefault = entry ? entry->col->index () : -1; 430 short dDefault = entry ? entry->col->index : -1;
431 short dValue; 431 short dValue;
432 432
433 if (ColorSelectDialog::staticDialog (dValue, dDefault, this) == false) 433 if (ColorSelectDialog::staticDialog (dValue, dDefault, this) == false)
434 return; 434 return;
435 435
672 val += ':'; 672 val += ':';
673 673
674 if (entry.bSeparator) 674 if (entry.bSeparator)
675 val += '|'; 675 val += '|';
676 else 676 else
677 val.appendformat ("%d", entry.col->index ()); 677 val += fmt ("%d", entry.col->index);
678 } 678 }
679 679
680 return val; 680 return val;
681 } 681 }
682 682

mercurial