fix(content): Font is not obviously bolded in contents.
Description: 修复文本搜索字体加粗不明显的bug Log: 修复文本搜索字体加粗不明显的bug Bug: http://172.17.66.192/biz/bug-view-33411.html
This commit is contained in:
parent
4e0ee32008
commit
475f309cac
|
@ -65,13 +65,13 @@ QString SearchDetailView::getHtmlText(const QString & text, const QString & keyw
|
||||||
if ((keyword.toUpper()).contains(QString(text.at(i)).toUpper())) {
|
if ((keyword.toUpper()).contains(QString(text.at(i)).toUpper())) {
|
||||||
if (! boldOpenned) {
|
if (! boldOpenned) {
|
||||||
boldOpenned = true;
|
boldOpenned = true;
|
||||||
htmlString.append(QString("<b>"));
|
htmlString.append(QString("<b><font size=\"4\">"));
|
||||||
}
|
}
|
||||||
htmlString.append(QString(text.at(i)));
|
htmlString.append(QString(text.at(i)));
|
||||||
} else {
|
} else {
|
||||||
if (boldOpenned) {
|
if (boldOpenned) {
|
||||||
boldOpenned = false;
|
boldOpenned = false;
|
||||||
htmlString.append(QString("</b>"));
|
htmlString.append(QString("</font></b>"));
|
||||||
}
|
}
|
||||||
htmlString.append(QString(text.at(i)));
|
htmlString.append(QString(text.at(i)));
|
||||||
}
|
}
|
||||||
|
|
|
@ -206,7 +206,7 @@ void MainWindow::initUi()
|
||||||
&MainWindow::primaryScreenChangedSlot);
|
&MainWindow::primaryScreenChangedSlot);
|
||||||
connect(m_searchLayout, &UkuiSearchBarHLayout::textChanged, this, [ = ](QString text) {
|
connect(m_searchLayout, &UkuiSearchBarHLayout::textChanged, this, [ = ](QString text) {
|
||||||
if (text == "") {
|
if (text == "") {
|
||||||
if (m_search_result_thread->isInterruptionRequested()) {
|
if (m_search_result_thread->isRunning()) {
|
||||||
m_search_result_thread->requestInterruption();
|
m_search_result_thread->requestInterruption();
|
||||||
m_search_result_thread->quit();
|
m_search_result_thread->quit();
|
||||||
}
|
}
|
||||||
|
@ -214,7 +214,7 @@ void MainWindow::initUi()
|
||||||
} else {
|
} else {
|
||||||
m_contentFrame->setCurrentIndex(1);
|
m_contentFrame->setCurrentIndex(1);
|
||||||
// QTimer::singleShot(50,this,[=](){
|
// QTimer::singleShot(50,this,[=](){
|
||||||
if (! m_search_result_thread->isInterruptionRequested()) {
|
if (! m_search_result_thread->isRunning()) {
|
||||||
m_search_result_thread->start();
|
m_search_result_thread->start();
|
||||||
}
|
}
|
||||||
searchContent(text);
|
searchContent(text);
|
||||||
|
|
Loading…
Reference in New Issue