Changeset 317ba0432e in tspsg for src/settingsdialog.cpp


Ignore:
Timestamp:
Apr 19, 2010, 10:33:02 PM (14 years ago)
Author:
Oleksii Serdiuk
Branches:
0.1.3.145-beta1-symbian, 0.1.4.170-beta2-bb10, appveyor, imgbot, master, readme
Children:
b574c383b7
Parents:
a23f4c292f
git-author:
Oleksii Serdiuk <contacts@…> (04/19/10 22:33:02)
git-committer:
Oleksii Serdiuk <contacts@…> (06/29/12 19:41:27)
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
  • src/settingsdialog.cpp

    ra23f4c292f r317ba0432e  
    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.