Changeset 176 in tspsg-svn
- Timestamp:
- May 31, 2011, 2:01:38 PM (13 years ago)
- Location:
- trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/defaults.h
r169 r176 110 110 #define DEF_TEXT_COLOR QPalette().color(QPalette::Text) 111 111 //! Default selected candidate color 112 #define DEF_SELECTED_COLOR QColor(0x008000)112 #define DEF_SELECTED_COLOR "#008000" 113 113 //! Default alternate candidate color 114 #define DEF_ALTERNATE_COLOR QColor(0xA00000) 114 #define DEF_ALTERNATE_COLOR "#A00000" 115 //! Default table border color 116 #define DEF_TABLE_COLOR "#EEEEEE" 115 117 116 118 #ifndef QT_NO_PRINTER -
trunk/src/mainwindow.cpp
r174 r176 1283 1283 fmt_lastparagraph.setLeftMargin(10); 1284 1284 1285 settings->beginGroup("Output/Colors"); 1286 1285 1287 fmt_table.setTopMargin(5); 1286 1288 fmt_table.setRightMargin(10); 1287 1289 fmt_table.setBottomMargin(0); 1288 1290 fmt_table.setLeftMargin(10); 1289 fmt_table.setBorder(0); 1290 fmt_table.setBorderStyle(QTextFrameFormat::BorderStyle_None); 1291 fmt_table.setCellSpacing(5); 1291 fmt_table.setBorder(1); 1292 fmt_table.setBorderBrush(QBrush(QColor(settings->value("TableBorder", DEF_TABLE_COLOR).toString()))); 1293 fmt_table.setBorderStyle(QTextFrameFormat::BorderStyle_Solid); 1294 fmt_table.setCellSpacing(0); 1295 fmt_table.setCellPadding(2); 1292 1296 1293 1297 fmt_cell.setAlignment(Qt::AlignHCenter); 1294 1298 1295 settings->beginGroup("Output/Colors"); 1296 1297 QColor color = qvariant_cast<QColor>(settings->value("Text", DEF_TEXT_COLOR)); 1299 QColor color = QColor(settings->value("Text", DEF_TEXT_COLOR).toString()); 1298 1300 QColor hilight; 1299 1301 if (color.value() < 192) … … 1305 1307 fmt_default.setForeground(QBrush(color)); 1306 1308 1307 fmt_selected.setForeground(QBrush( qvariant_cast<QColor>(settings->value("Selected", DEF_SELECTED_COLOR))));1309 fmt_selected.setForeground(QBrush(QColor(settings->value("Selected", DEF_SELECTED_COLOR).toString()))); 1308 1310 fmt_selected.setFontWeight(QFont::Bold); 1309 1311 1310 fmt_alternate.setForeground(QBrush( qvariant_cast<QColor>(settings->value("Alternate", DEF_ALTERNATE_COLOR))));1312 fmt_alternate.setForeground(QBrush(QColor(settings->value("Alternate", DEF_ALTERNATE_COLOR).toString()))); 1311 1313 fmt_alternate.setFontWeight(QFont::Bold); 1312 1314 fmt_altlist.setForeground(QBrush(hilight)); -
trunk/src/settingsdialog.cpp
r175 r176 288 288 289 289 font = qvariant_cast<QFont>(settings->value("Font", QFont(DEF_FONT_FACE, DEF_FONT_SIZE))); 290 color = qvariant_cast<QColor>(settings->value("Colors/Text", DEF_TEXT_COLOR));290 color = QColor(settings->value("Colors/Text", DEF_TEXT_COLOR).toString()); 291 291 settings->endGroup(); 292 292 … … 395 395 settings->setValue("Font", font); 396 396 if (_newColor) 397 settings->setValue("Colors/Text", color );397 settings->setValue("Colors/Text", color.name()); 398 398 settings->endGroup(); 399 399 QDialog::accept();
Note: See TracChangeset
for help on using the changeset viewer.