@@ -739,7 +739,8 @@ SearchResultItem::SearchResultItem(const QString& text, const QColor& color, std
739739 : FloatingTextItem(text, action, parent)
740740{
741741 setDefaultTextColor (color);
742- setHtml (" <div style='background:rgba(150, 150, 150, 30%);'>" + toPlainText () + " </div>" );
742+ auto backgroundGray = QString (" background:rgba(%1, %1, %1, 30%)" ).arg (200 );
743+ setHtml (" <div style='" + backgroundGray + " ;font: 15px Lucida, sans-serif'>" + toPlainText () + " </div>" );
743744 items_.insert (this );
744745}
745746
@@ -822,6 +823,18 @@ class NetworkSearchEngine
822823 Qt::yellow);
823824 }
824825
826+ auto dialog = mod->getModuleWidget ()->dialog ();
827+ if (dialog && text.length () > 5 )
828+ {
829+ auto widgetMatches = dialog->findChildren <QWidget*>(QRegExp (" .*" + text + " .*" , Qt::CaseInsensitive));
830+ Q_FOREACH (auto widget, widgetMatches)
831+ {
832+ results.emplace_back (" Module UI widget match" ,
833+ QString::fromStdString (id) + " ::" + widget->objectName (),
834+ [mod]() { mod->showAndColor (" #AA3333" ); },
835+ " #AA3333" );
836+ }
837+ }
825838 return results;
826839 }
827840
@@ -880,15 +893,15 @@ void NetworkEditor::searchTextChanged(const QString& text)
880893 if (!results.empty ())
881894 {
882895 auto title = new SearchResultItem (" Search results:" , Qt::green, {});
883- title->setPos (positionOfFloatingText (title->num (), true , 20 , textScale * 20 ));
896+ title->setPos (positionOfFloatingText (title->num (), true , 20 , textScale * 22 ));
884897 scene ()->addItem (title);
885898 title->scale (textScale, textScale);
886899 }
887900 for (const auto & result : results)
888901 {
889902 auto searchItem = new SearchResultItem (std::get<ItemType>(result) + " : " + std::get<ItemName>(result),
890903 std::get<ItemColor>(result), std::get<ItemAction>(result));
891- searchItem->setPos (positionOfFloatingText (searchItem->num (), true , 50 , textScale * 20 ));
904+ searchItem->setPos (positionOfFloatingText (searchItem->num (), true , 50 , textScale * 22 ));
892905 scene ()->addItem (searchItem);
893906 searchItem->scale (textScale, textScale);
894907 }
0 commit comments