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>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLineEdit" name="qtermStyleLE">
|
<widget class="QComboBox" name="qtermStyleCMB">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>50</width>
|
<width>50</width>
|
||||||
@ -474,6 +474,12 @@
|
|||||||
<property name="toolTip">
|
<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>
|
<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>
|
||||||
|
<property name="editable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="insertPolicy">
|
||||||
|
<enum>QComboBox::NoInsert</enum>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
@ -1494,7 +1500,7 @@ May be slow for big documents.</string>
|
|||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
<buttongroups>
|
<buttongroups>
|
||||||
<buttongroup name="buttonGroup_2"/>
|
|
||||||
<buttongroup name="buttonGroup"/>
|
<buttongroup name="buttonGroup"/>
|
||||||
|
<buttongroup name="buttonGroup_2"/>
|
||||||
</buttongroups>
|
</buttongroups>
|
||||||
</ui>
|
</ui>
|
||||||
|
|||||||
@ -183,7 +183,14 @@ void UIPrefsDialog::setFromPrefs()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Query terms color
|
// 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
|
// Abstract snippet separator string
|
||||||
abssepLE->setText(prefs.abssep);
|
abssepLE->setText(prefs.abssep);
|
||||||
dateformatLE->setText(prefs.reslistdateformat);
|
dateformatLE->setText(prefs.reslistdateformat);
|
||||||
@ -374,7 +381,7 @@ void UIPrefsDialog::accept()
|
|||||||
prefs.collapseDuplicates = collapseDupsCB->isChecked();
|
prefs.collapseDuplicates = collapseDupsCB->isChecked();
|
||||||
prefs.maxhltextkbs = maxHLTSB->value();
|
prefs.maxhltextkbs = maxHLTSB->value();
|
||||||
|
|
||||||
prefs.qtermstyle = qtermStyleLE->text();
|
prefs.qtermstyle = qtermStyleCMB->currentText();
|
||||||
prefs.abssep = abssepLE->text();
|
prefs.abssep = abssepLE->text();
|
||||||
prefs.reslistdateformat = dateformatLE->text();
|
prefs.reslistdateformat = dateformatLE->text();
|
||||||
prefs.creslistdateformat = (const char*)prefs.reslistdateformat.toUtf8();
|
prefs.creslistdateformat = (const char*)prefs.reslistdateformat.toUtf8();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user