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:
zhangjiaping 2021-01-14 10:20:54 +08:00
parent 4e0ee32008
commit 475f309cac
2 changed files with 4 additions and 4 deletions

View File

@ -65,13 +65,13 @@ QString SearchDetailView::getHtmlText(const QString & text, const QString & keyw
if ((keyword.toUpper()).contains(QString(text.at(i)).toUpper())) {
if (! boldOpenned) {
boldOpenned = true;
htmlString.append(QString("<b>"));
htmlString.append(QString("<b><font size=\"4\">"));
}
htmlString.append(QString(text.at(i)));
} else {
if (boldOpenned) {
boldOpenned = false;
htmlString.append(QString("</b>"));
htmlString.append(QString("</font></b>"));
}
htmlString.append(QString(text.at(i)));
}

View File

@ -206,7 +206,7 @@ void MainWindow::initUi()
&MainWindow::primaryScreenChangedSlot);
connect(m_searchLayout, &UkuiSearchBarHLayout::textChanged, this, [ = ](QString text) {
if (text == "") {
if (m_search_result_thread->isInterruptionRequested()) {
if (m_search_result_thread->isRunning()) {
m_search_result_thread->requestInterruption();
m_search_result_thread->quit();
}
@ -214,7 +214,7 @@ void MainWindow::initUi()
} else {
m_contentFrame->setCurrentIndex(1);
// QTimer::singleShot(50,this,[=](){
if (! m_search_result_thread->isInterruptionRequested()) {
if (! m_search_result_thread->isRunning()) {
m_search_result_thread->start();
}
searchContent(text);