Skip to content

Commit

Permalink
Merge pull request #2005 from xiaoyifang/opt/ui-interaction
Browse files Browse the repository at this point in the history
opt: remove the tooltip ,too simple to display
  • Loading branch information
xiaoyifang authored Dec 2, 2024
2 parents f3be5be + 7577db8 commit ec364f0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 17 deletions.
17 changes: 2 additions & 15 deletions src/article_maker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -133,19 +133,6 @@ std::string ArticleMaker::makeHtmlHeader( QString const & word, QString const &
R"(<link rel="icon" type="image/png" href="qrc:///flags/)" + Html::escape( icon.toUtf8().data() ) + "\" >\n";
}

result += QString::fromUtf8( R"(
<script>
function tr(key) {
var tr_map = {
"Expand article": "%1", "Collapse article": "%2"
};
return tr_map[key] || '';
}
</script>
)" )
.arg( tr( "Expand article" ), tr( "Collapse article" ) )
.toStdString();

result += R"(<script src="qrc:///scripts/gd-builtin.js"></script>)";
result += R"(<script src="qrc:///scripts/mark.min.js"></script>)";

Expand Down Expand Up @@ -676,11 +663,11 @@ void ArticleRequest::bodyFinished()
</div>)" ),
dictId,
collapse ? R"(style="cursor:pointer;")" : "",
collapse ? tr( "Expand article" ).toStdString() : "",
"",
Html::escape( tr( "From " ).toStdString() ),
Html::escape( activeDict->getName() ),
collapse ? "gdexpandicon" : "gdcollapseicon",
collapse ? "" : tr( "Collapse article" ).toStdString() );
"" );

head += R"(<div class="gddictnamebodyseparator"></div>)";

Expand Down
2 changes: 0 additions & 2 deletions src/scripts/gd-builtin.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ function gdExpandArticle(id) {
nm = document.getElementById("gddictname-" + id);
nm.style.cursor = "pointer";
if (ev) ev.stopPropagation();
ico.title = tr("Expand article");
nm.title = "";
articleview.collapseInHtml(id, true);
} else if (elem.style.display == "none") {
Expand All @@ -108,7 +107,6 @@ function gdExpandArticle(id) {
nm = document.getElementById("gddictname-" + id);
nm.style.cursor = "default";
nm.title = "";
ico.title = tr("Collapse article");
articleview.collapseInHtml(id, false);
}
}
Expand Down

0 comments on commit ec364f0

Please sign in to comment.