prefs: make the query term css entry a combo so that we can supply some examples
This commit is contained in:
parent
78984b9fda
commit
57d47e6784
@ -464,7 +464,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="qtermStyleLE">
|
||||
<widget class="QComboBox" name="qtermStyleCMB">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
@ -474,6 +474,12 @@
|
||||
<property name="toolTip">
|
||||
<string>Query terms highlighting in results. <br>Maybe try something like "color:red;background:yellow" for something more lively than the default blue...</string>
|
||||
</property>
|
||||
<property name="editable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="insertPolicy">
|
||||
<enum>QComboBox::NoInsert</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
@ -1494,7 +1500,7 @@ May be slow for big documents.</string>
|
||||
<resources/>
|
||||
<connections/>
|
||||
<buttongroups>
|
||||
<buttongroup name="buttonGroup_2"/>
|
||||
<buttongroup name="buttonGroup"/>
|
||||
<buttongroup name="buttonGroup_2"/>
|
||||
</buttongroups>
|
||||
</ui>
|
||||
|
||||
@ -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();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user