Index: resources/desktop.qrc
===================================================================
--- resources/desktop.qrc	(revision ff8d0488a0ca07b4c25f2ba2c28eb134790ec5a1)
+++ resources/desktop.qrc	(revision a09f31733a6c5b1121281ac5b61a2430fe6570b9)
@@ -15,4 +15,6 @@
         <file>icons/128x128/document-save.png</file>
         <file>icons/128x128/document-save-as.png</file>
+        <file>icons/128x128/format-fill-color.png</file>
+        <file>icons/128x128/format-stroke-color.png</file>
         <file>icons/128x128/format-text-color.png</file>
         <file>icons/128x128/go-previous.png</file>
Index: resources/handheld.qrc
===================================================================
--- resources/handheld.qrc	(revision ff8d0488a0ca07b4c25f2ba2c28eb134790ec5a1)
+++ resources/handheld.qrc	(revision a09f31733a6c5b1121281ac5b61a2430fe6570b9)
@@ -8,4 +8,6 @@
         <file>icons/48x48/document-save.png</file>
         <file>icons/48x48/document-save-as.png</file>
+        <file>icons/48x48/format-fill-color.png</file>
+        <file>icons/48x48/format-stroke-color.png</file>
         <file>icons/48x48/format-text-color.png</file>
         <file>icons/48x48/go-previous.png</file>
Index: src/defaults.h
===================================================================
--- src/defaults.h	(revision ff8d0488a0ca07b4c25f2ba2c28eb134790ec5a1)
+++ src/defaults.h	(revision a09f31733a6c5b1121281ac5b61a2430fe6570b9)
@@ -107,5 +107,5 @@
 #   define DEF_FONT_SIZE 10
 #endif // Q_WS_S60
-//! Default text color
+//! Default solution text color
 #define DEF_TEXT_COLOR QPalette().color(QPalette::Text)
 //! Default selected candidate color
@@ -114,5 +114,7 @@
 #define DEF_ALTERNATE_COLOR "#A00000"
 //! Default table border color
-#define DEF_TABLE_COLOR "#EEEEEE"
+#define DEF_TABLE_COLOR QPalette().color(QPalette::AlternateBase)
+//! Default solution background color
+#define DEF_BACKGROUND_COLOR QPalette().color(QPalette::Base)
 
 #ifndef QT_NO_PRINTER
Index: src/settingsdialog.cpp
===================================================================
--- src/settingsdialog.cpp	(revision ff8d0488a0ca07b4c25f2ba2c28eb134790ec5a1)
+++ src/settingsdialog.cpp	(revision a09f31733a6c5b1121281ac5b61a2430fe6570b9)
@@ -31,5 +31,5 @@
  */
 SettingsDialog::SettingsDialog(QWidget *parent)
-    : QDialog(parent), _newFont(false), _newColor(false), _translucency(0)
+    : QDialog(parent), _fontChanged(false), _colorChanged(false), _translucency(0)
 {
     setupUi(this);
@@ -48,5 +48,9 @@
     buttonBox->button(QDialogButtonBox::Cancel)->setCursor(QCursor(Qt::PointingHandCursor));
 
-    buttonColor->setIcon(GET_ICON("format-text-color"));
+    buttonTextColor->setIcon(GET_ICON("format-text-color"));
+    buttonSelectedColor->setIcon(GET_ICON("format-text-color"));
+    buttonAlternateColor->setIcon(GET_ICON("format-text-color"));
+    buttonBorderColor->setIcon(GET_ICON("format-stroke-color"));
+    buttonBgColor->setIcon(GET_ICON("format-fill-color"));
     buttonFont->setIcon(GET_ICON("preferences-desktop-font"));
     buttonHelp->setIcon(GET_ICON("help-hint"));
@@ -212,5 +216,5 @@
     connect(spinRandMin, SIGNAL(valueChanged(int)), SLOT(spinRandMinValueChanged(int)));
     connect(buttonFont, SIGNAL(clicked()), SLOT(buttonFontClicked()));
-    connect(buttonColor, SIGNAL(clicked()), SLOT(buttonColorClicked()));
+    connect(buttonTextColor, SIGNAL(clicked()), SLOT(buttonTextColorClicked()));
     setWindowFlags(windowFlags() ^ Qt::WindowContextHelpButtonHint);
 #if !defined(QT_NO_STATUSTIP) && !defined(HANDHELD)
@@ -288,6 +292,35 @@
 
     font = qvariant_cast<QFont>(settings->value("Font", QFont(DEF_FONT_FACE, DEF_FONT_SIZE)));
-    color = QColor(settings->value("Colors/Text", DEF_TEXT_COLOR).toString());
+    textColor = QColor(settings->value("Colors/Text", DEF_TEXT_COLOR).toString());
+    selColor = QColor(settings->value("Colors/Selected", DEF_SELECTED_COLOR).toString());
+    altColor = QColor(settings->value("Colors/Alternate", DEF_ALTERNATE_COLOR).toString());
+    borderColor = QColor(settings->value("Colors/Border", DEF_TABLE_COLOR).toString());
+    bgColor = QColor(settings->value("Colors/Background", DEF_BACKGROUND_COLOR).toString());
     settings->endGroup();
+
+    QFont f = font;
+    f.setPointSize(labelFontExample->font().pointSize());
+    labelFontExample->setFont(f);
+    labelFontExample->setText(font.family());
+
+    p = boxTextColor->palette();
+    p.setColor(QPalette::Window, textColor);
+    boxTextColor->setPalette(p);
+
+    p = boxSelectedColor->palette();
+    p.setColor(QPalette::Window, selColor);
+    boxSelectedColor->setPalette(p);
+
+    p = boxAlternateColor->palette();
+    p.setColor(QPalette::Window, altColor);
+    boxAlternateColor->setPalette(p);
+
+    p = boxBorderColor->palette();
+    p.setColor(QPalette::Window, borderColor);
+    boxBorderColor->setPalette(p);
+
+    p = boxBgColor->palette();
+    p.setColor(QPalette::Window, bgColor);
+    boxBgColor->setPalette(p);
 
 #ifdef HANDHELD
@@ -304,5 +337,5 @@
 bool SettingsDialog::colorChanged() const
 {
-    return _newColor;
+    return _colorChanged;
 }
 
@@ -313,5 +346,5 @@
 bool SettingsDialog::fontChanged() const
 {
-    return _newFont;
+    return _fontChanged;
 }
 
@@ -333,6 +366,6 @@
     if (QApplication::keyboardModifiers() & Qt::ShiftModifier) {
         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) {
-            _newFont = (font != QFont(DEF_FONT_FACE, DEF_FONT_SIZE));
-            _newColor = (color != DEF_TEXT_COLOR);
+            _fontChanged = (font != QFont(DEF_FONT_FACE, DEF_FONT_SIZE));
+            _colorChanged = (textColor != DEF_TEXT_COLOR);
             settings->remove("");
             settings->setValue("SettingsReset", true);
@@ -392,18 +425,18 @@
         settings->setValue("ShowMatrixLimit", spinCitiesLimit->value());
     settings->setValue("ScrollToEnd", cbScrollToEnd->isChecked());
-    if (_newFont)
+    if (_fontChanged)
         settings->setValue("Font", font);
-    if (_newColor)
-        settings->setValue("Colors/Text", color.name());
+    if (_colorChanged)
+        settings->setValue("Colors/Text", textColor.name());
     settings->endGroup();
     QDialog::accept();
 }
 
-void SettingsDialog::buttonColorClicked()
-{
-QColor color = QColorDialog::getColor(this->color,this);
-    if (color.isValid() && (this->color != color)) {
-        this->color = color;
-        _newColor = true;
+void SettingsDialog::buttonTextColorClicked()
+{
+QColor color = QColorDialog::getColor(this->textColor,this);
+    if (color.isValid() && (this->textColor != color)) {
+        this->textColor = color;
+        _colorChanged = true;
     }
 }
@@ -412,8 +445,12 @@
 {
 bool ok;
-QFont font = QFontDialog::getFont(&ok,this->font,this);
+QFont font = QFontDialog::getFont(&ok, this->font, this);
     if (ok && (this->font != font)) {
         this->font = font;
-        _newFont = true;
+        QFont f = font;
+        f.setPointSize(labelFontExample->font().pointSize());
+        labelFontExample->setFont(f);
+        labelFontExample->setText(font.family());
+        _fontChanged = true;
     }
 }
Index: src/settingsdialog.h
===================================================================
--- src/settingsdialog.h	(revision ff8d0488a0ca07b4c25f2ba2c28eb134790ec5a1)
+++ src/settingsdialog.h	(revision a09f31733a6c5b1121281ac5b61a2430fe6570b9)
@@ -47,9 +47,9 @@
 
 private:
-    bool _newFont;
-    bool _newColor;
+    bool _fontChanged;
+    bool _colorChanged;
     qint8 _translucency;
 
-    QColor color;
+    QColor textColor, selColor, altColor, borderColor, bgColor;
     QFont font;
 
@@ -79,5 +79,5 @@
 private slots:
     void accept();
-    void buttonColorClicked();
+    void buttonTextColorClicked();
     void buttonFontClicked();
 #ifdef Q_WS_WINCE_WM
Index: ui/settingsdialog.ui
===================================================================
--- ui/settingsdialog.ui	(revision ff8d0488a0ca07b4c25f2ba2c28eb134790ec5a1)
+++ ui/settingsdialog.ui	(revision a09f31733a6c5b1121281ac5b61a2430fe6570b9)
@@ -302,4 +302,7 @@
             <string>General</string>
            </attribute>
+           <attribute name="toolTip">
+            <string>General solution output settings</string>
+           </attribute>
            <layout class="QVBoxLayout" name="_6">
             <item>
@@ -515,7 +518,33 @@
             <string comment="Needs double &amp; or it won't be displayed!">Font &amp;&amp; Colors</string>
            </attribute>
+           <attribute name="toolTip">
+            <string>Font and color settings for solution output</string>
+           </attribute>
            <layout class="QVBoxLayout" name="_11">
             <item>
              <layout class="QHBoxLayout" name="_13">
+              <item>
+               <widget class="QLabel" name="labelFont">
+                <property name="statusTip">
+                 <string>Font used for solution output</string>
+                </property>
+                <property name="text">
+                 <string>Text font:</string>
+                </property>
+               </widget>
+              </item>
+              <item>
+               <widget class="QLabel" name="labelFontExample">
+                <property name="sizePolicy">
+                 <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
+                  <horstretch>0</horstretch>
+                  <verstretch>0</verstretch>
+                 </sizepolicy>
+                </property>
+                <property name="statusTip">
+                 <string>Font used for solution output</string>
+                </property>
+               </widget>
+              </item>
               <item>
                <widget class="QPushButton" name="buttonFont">
@@ -524,36 +553,318 @@
                 </property>
                 <property name="statusTip">
-                 <string>Font face for solution output</string>
+                 <string>Change output font</string>
+                </property>
+               </widget>
+              </item>
+             </layout>
+            </item>
+            <item>
+             <layout class="QHBoxLayout" name="_15">
+              <item>
+               <widget class="QLabel" name="labelTextColor">
+                <property name="sizePolicy">
+                 <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
+                  <horstretch>0</horstretch>
+                  <verstretch>0</verstretch>
+                 </sizepolicy>
+                </property>
+                <property name="statusTip">
+                 <string>Font color for solution output</string>
                 </property>
                 <property name="text">
-                 <string>&amp;Font...</string>
-                </property>
-               </widget>
-              </item>
-              <item>
-               <widget class="QPushButton" name="buttonColor">
+                 <string>Text color:</string>
+                </property>
+               </widget>
+              </item>
+              <item>
+               <widget class="QFrame" name="boxTextColor">
+                <property name="sizePolicy">
+                 <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+                  <horstretch>0</horstretch>
+                  <verstretch>0</verstretch>
+                 </sizepolicy>
+                </property>
+                <property name="minimumSize">
+                 <size>
+                  <width>15</width>
+                  <height>15</height>
+                 </size>
+                </property>
+                <property name="statusTip">
+                 <string>Font color for solution output</string>
+                </property>
+                <property name="autoFillBackground">
+                 <bool>true</bool>
+                </property>
+                <property name="frameShape">
+                 <enum>QFrame::Box</enum>
+                </property>
+               </widget>
+              </item>
+              <item>
+               <widget class="QPushButton" name="buttonTextColor">
                 <property name="cursor">
                  <cursorShape>PointingHandCursor</cursorShape>
                 </property>
                 <property name="statusTip">
-                 <string>Font color for solution output</string>
+                 <string>Change font color</string>
+                </property>
+               </widget>
+              </item>
+             </layout>
+            </item>
+            <item>
+             <layout class="QHBoxLayout" name="_17">
+              <item>
+               <widget class="QLabel" name="labelSelectedColor">
+                <property name="enabled">
+                 <bool>false</bool>
+                </property>
+                <property name="sizePolicy">
+                 <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
+                  <horstretch>0</horstretch>
+                  <verstretch>0</verstretch>
+                 </sizepolicy>
+                </property>
+                <property name="statusTip">
+                 <string>Font color for the candidate that was selected for branching</string>
                 </property>
                 <property name="text">
-                 <string>&amp;Color...</string>
-                </property>
-               </widget>
-              </item>
-              <item>
-               <spacer name="spacer_5">
-                <property name="orientation">
-                 <enum>Qt::Horizontal</enum>
-                </property>
-                <property name="sizeHint" stdset="0">
+                 <string>Selected candidate color:</string>
+                </property>
+               </widget>
+              </item>
+              <item>
+               <widget class="QFrame" name="boxSelectedColor">
+                <property name="enabled">
+                 <bool>false</bool>
+                </property>
+                <property name="sizePolicy">
+                 <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+                  <horstretch>0</horstretch>
+                  <verstretch>0</verstretch>
+                 </sizepolicy>
+                </property>
+                <property name="minimumSize">
                  <size>
-                  <width>1</width>
-                  <height>0</height>
+                  <width>15</width>
+                  <height>15</height>
                  </size>
                 </property>
-               </spacer>
+                <property name="statusTip">
+                 <string>Font color for the candidate that was selected for branching</string>
+                </property>
+                <property name="autoFillBackground">
+                 <bool>true</bool>
+                </property>
+                <property name="frameShape">
+                 <enum>QFrame::Box</enum>
+                </property>
+               </widget>
+              </item>
+              <item>
+               <widget class="QPushButton" name="buttonSelectedColor">
+                <property name="enabled">
+                 <bool>false</bool>
+                </property>
+                <property name="cursor">
+                 <cursorShape>PointingHandCursor</cursorShape>
+                </property>
+                <property name="statusTip">
+                 <string>Change selected candidate color</string>
+                </property>
+               </widget>
+              </item>
+             </layout>
+            </item>
+            <item>
+             <layout class="QHBoxLayout" name="_18">
+              <item>
+               <widget class="QLabel" name="labelAlternateColor">
+                <property name="enabled">
+                 <bool>false</bool>
+                </property>
+                <property name="sizePolicy">
+                 <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
+                  <horstretch>0</horstretch>
+                  <verstretch>0</verstretch>
+                 </sizepolicy>
+                </property>
+                <property name="statusTip">
+                 <string>Font color for the alternate candidate that wasn't selected for branching</string>
+                </property>
+                <property name="text">
+                 <string>Alternate candidate color:</string>
+                </property>
+               </widget>
+              </item>
+              <item>
+               <widget class="QFrame" name="boxAlternateColor">
+                <property name="enabled">
+                 <bool>false</bool>
+                </property>
+                <property name="sizePolicy">
+                 <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+                  <horstretch>0</horstretch>
+                  <verstretch>0</verstretch>
+                 </sizepolicy>
+                </property>
+                <property name="minimumSize">
+                 <size>
+                  <width>15</width>
+                  <height>15</height>
+                 </size>
+                </property>
+                <property name="statusTip">
+                 <string>Font color for the alternate candidate that wasn't selected for branching</string>
+                </property>
+                <property name="autoFillBackground">
+                 <bool>true</bool>
+                </property>
+                <property name="frameShape">
+                 <enum>QFrame::Box</enum>
+                </property>
+               </widget>
+              </item>
+              <item>
+               <widget class="QPushButton" name="buttonAlternateColor">
+                <property name="enabled">
+                 <bool>false</bool>
+                </property>
+                <property name="cursor">
+                 <cursorShape>PointingHandCursor</cursorShape>
+                </property>
+                <property name="statusTip">
+                 <string>Change alternate candidate color</string>
+                </property>
+               </widget>
+              </item>
+             </layout>
+            </item>
+            <item>
+             <layout class="QHBoxLayout" name="_19">
+              <item>
+               <widget class="QLabel" name="labelBorderColor">
+                <property name="enabled">
+                 <bool>false</bool>
+                </property>
+                <property name="sizePolicy">
+                 <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
+                  <horstretch>0</horstretch>
+                  <verstretch>0</verstretch>
+                 </sizepolicy>
+                </property>
+                <property name="statusTip">
+                 <string>Color of table borders in solution output</string>
+                </property>
+                <property name="text">
+                 <string>Table borders color:</string>
+                </property>
+               </widget>
+              </item>
+              <item>
+               <widget class="QFrame" name="boxBorderColor">
+                <property name="enabled">
+                 <bool>false</bool>
+                </property>
+                <property name="sizePolicy">
+                 <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+                  <horstretch>0</horstretch>
+                  <verstretch>0</verstretch>
+                 </sizepolicy>
+                </property>
+                <property name="minimumSize">
+                 <size>
+                  <width>15</width>
+                  <height>15</height>
+                 </size>
+                </property>
+                <property name="statusTip">
+                 <string>Color of table borders in solution output</string>
+                </property>
+                <property name="autoFillBackground">
+                 <bool>true</bool>
+                </property>
+                <property name="frameShape">
+                 <enum>QFrame::Box</enum>
+                </property>
+               </widget>
+              </item>
+              <item>
+               <widget class="QPushButton" name="buttonBorderColor">
+                <property name="enabled">
+                 <bool>false</bool>
+                </property>
+                <property name="cursor">
+                 <cursorShape>PointingHandCursor</cursorShape>
+                </property>
+                <property name="statusTip">
+                 <string>Change color of table borders</string>
+                </property>
+               </widget>
+              </item>
+             </layout>
+            </item>
+            <item>
+             <layout class="QHBoxLayout" name="_16">
+              <item>
+               <widget class="QLabel" name="labelBgColor">
+                <property name="enabled">
+                 <bool>false</bool>
+                </property>
+                <property name="sizePolicy">
+                 <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
+                  <horstretch>0</horstretch>
+                  <verstretch>0</verstretch>
+                 </sizepolicy>
+                </property>
+                <property name="statusTip">
+                 <string>Background color for solution output</string>
+                </property>
+                <property name="text">
+                 <string>Background color:</string>
+                </property>
+               </widget>
+              </item>
+              <item>
+               <widget class="QFrame" name="boxBgColor">
+                <property name="enabled">
+                 <bool>false</bool>
+                </property>
+                <property name="sizePolicy">
+                 <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+                  <horstretch>0</horstretch>
+                  <verstretch>0</verstretch>
+                 </sizepolicy>
+                </property>
+                <property name="minimumSize">
+                 <size>
+                  <width>15</width>
+                  <height>15</height>
+                 </size>
+                </property>
+                <property name="statusTip">
+                 <string>Background color for solution output</string>
+                </property>
+                <property name="autoFillBackground">
+                 <bool>true</bool>
+                </property>
+                <property name="frameShape">
+                 <enum>QFrame::Box</enum>
+                </property>
+               </widget>
+              </item>
+              <item>
+               <widget class="QPushButton" name="buttonBgColor">
+                <property name="enabled">
+                 <bool>false</bool>
+                </property>
+                <property name="cursor">
+                 <cursorShape>PointingHandCursor</cursorShape>
+                </property>
+                <property name="statusTip">
+                 <string>Change background color</string>
+                </property>
+               </widget>
               </item>
              </layout>
