Changeset 104 in tspsg-svn for trunk/src/settingsdialog.cpp


Ignore:
Timestamp:
Apr 19, 2010, 10:33:02 PM (15 years ago)
Author:
laleppa
Message:
  • Improved the solution output generation algorithm. Now it works directly with QTextDocument instead of "feeding" it with HTML. Thanks to this the solution output generation is now about 1.65 times faster.
  • Added .txt extension to ChangeLog?, INSTALL and README files to simplify opening these files in Windows.
  • Made a small improvement to Settings Dialog to follow the current application palette.
  • Output text color if not set is now determmined based on the current application palette.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/settingsdialog.cpp

    r100 r104  
    4141        buttonBox->button(QDialogButtonBox::Cancel)->setStatusTip(tr("Close without saving preferences"));
    4242        buttonBox->button(QDialogButtonBox::Cancel)->setCursor(QCursor(Qt::PointingHandCursor));
     43
     44QPalette p = bgWhite->palette();
     45        p.setColor(QPalette::Window, p.color(QPalette::Base));
     46        bgWhite->setPalette(p);
     47
     48        p = lineHorizontal->palette();
     49        p.setColor(QPalette::Window, p.color(QPalette::Text));
     50        lineHorizontal->setPalette(p);
    4351
    4452#ifdef HANDHELD
     
    195203
    196204        font = settings->value("Font",QFont(DEF_FONT_FAMILY,DEF_FONT_SIZE)).value<QFont>();
    197         color = settings->value("Color",DEF_FONT_COLOR).value<QColor>();
     205        color = settings->value("Colors/Text", DEF_TEXT_COLOR).value<QColor>();
    198206        settings->endGroup();
    199207
     
    239247                if (QMessageBox::question(this, tr("Settings Reset"), tr("Do you really want to <b>reset all application settings to their defaults</b>?"), QMessageBox::RestoreDefaults | QMessageBox::Cancel) == QMessageBox::RestoreDefaults) {
    240248                        _newFont = (font != QFont(DEF_FONT_FAMILY, DEF_FONT_SIZE));
    241                         _newColor = (color != DEF_FONT_COLOR);
     249                        _newColor = (color != DEF_TEXT_COLOR);
    242250                        settings->remove("");
    243251                        settings->setValue("SettingsReset", true);
     
    280288                settings->setValue("Font", font);
    281289        if (_newColor)
    282                 settings->setValue("Color", color);
     290                settings->setValue("Colors/Text", color);
    283291        settings->endGroup();
    284292        QDialog::accept();
Note: See TracChangeset for help on using the changeset viewer.