Changeset c8ed26ddf1 in tspsg for src/mainwindow.cpp


Ignore:
Timestamp:
Jul 17, 2012, 8:11:11 PM (12 years ago)
Author:
Oleksii Serdiuk
Branches:
appveyor, imgbot, master, readme
Children:
50b614b0ea
Parents:
7e8e1b444d
git-author:
Oleksii Serdiuk <contacts@…> (07/17/12 20:11:11)
git-committer:
Oleksii Serdiuk <contacts@…> (07/17/12 20:24:34)
Message:

Implemented color selection from Settings Dialog.

Changing background color appeared to be much harder than expected, so
this feature was removed for now. It is possible to change background
color of the solution output area. However, this background change
doesn't affect printing and export - there background color always stays
white. Will investigate possible workarounds later...

Closes ticket:13 - All colors should be configurable through Settings Dialog

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mainwindow.cpp

    r7e8e1b444d rc8ed26ddf1  
    303303
    304304        html.replace(QRegExp("font-family:([^;]*);"), "font-family:\\1, 'DejaVu Sans Mono', 'Courier New', Courier, monospace;");
     305        html.replace(QRegExp("<style ([^>]*)>"), QString("<style \\1>\n"
     306                                                         "body { color: %1 }\n"
     307                                                         "td { border-style: solid; border-width: 1px; border-color: %2; }")
     308                     .arg(settings->value("Output/Colors/Font", DEF_TEXT_COLOR).toString(),
     309                          settings->value("Output/Colors/TableBorder", DEF_TABLE_COLOR).toString()));
    305310
    306311        if (!graph.isNull()) {
     
    10021007        pic.end();
    10031008
    1004 QImage i(graph.width() + 2, graph.height() + 2, QImage::Format_RGB32);
    1005         i.fill(0xFFFFFF);
     1009        QImage i(graph.width() + 2, graph.height() + 2, QImage::Format_ARGB32);
     1010        i.fill(QColor(255, 255, 255, 0));
    10061011        pic.begin(&i);
    10071012        pic.drawPicture(1, 1, graph);
     
    13191324
    13201325    settings->endGroup();
    1321 
    1322     solutionText->setTextColor(color);
    13231326}
    13241327
Note: See TracChangeset for help on using the changeset viewer.