diff --git a/src/qtgui/uiprefs.ui b/src/qtgui/uiprefs.ui index b06cb562..536db2fc 100644 --- a/src/qtgui/uiprefs.ui +++ b/src/qtgui/uiprefs.ui @@ -464,7 +464,7 @@ - + 50 @@ -474,6 +474,12 @@ Query terms highlighting in results. <br>Maybe try something like "color:red;background:yellow" for something more lively than the default blue... + + true + + + QComboBox::NoInsert + @@ -1494,7 +1500,7 @@ May be slow for big documents. - + diff --git a/src/qtgui/uiprefs_w.cpp b/src/qtgui/uiprefs_w.cpp index 6889db08..8f339786 100644 --- a/src/qtgui/uiprefs_w.cpp +++ b/src/qtgui/uiprefs_w.cpp @@ -183,7 +183,14 @@ void UIPrefsDialog::setFromPrefs() break; } // Query terms color - qtermStyleLE->setText(prefs.qtermstyle); + qtermStyleCMB->setCurrentText(prefs.qtermstyle); + if (qtermStyleCMB->count() <=1) { + qtermStyleCMB->addItem(prefs.qtermstyle); + qtermStyleCMB->addItem("color: blue"); + qtermStyleCMB->addItem("color: red;background: yellow"); + qtermStyleCMB->addItem( + "color: #dddddd; background: black; font-weight: bold"); + } // Abstract snippet separator string abssepLE->setText(prefs.abssep); dateformatLE->setText(prefs.reslistdateformat); @@ -374,7 +381,7 @@ void UIPrefsDialog::accept() prefs.collapseDuplicates = collapseDupsCB->isChecked(); prefs.maxhltextkbs = maxHLTSB->value(); - prefs.qtermstyle = qtermStyleLE->text(); + prefs.qtermstyle = qtermStyleCMB->currentText(); prefs.abssep = abssepLE->text(); prefs.reslistdateformat = dateformatLE->text(); prefs.creslistdateformat = (const char*)prefs.reslistdateformat.toUtf8();