mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-12-02 19:14:05 +00:00
opt: use link instead of button and tooltip
This commit is contained in:
parent
17d46fcac1
commit
b5a1192cfd
|
@ -250,11 +250,6 @@ std::string ArticleMaker::makeNotFoundBody( QString const & word, QString const
|
||||||
string ArticleMaker::makeWelcomeHtml() const
|
string ArticleMaker::makeWelcomeHtml() const
|
||||||
{
|
{
|
||||||
string result = makeHtmlHeader( tr( "Welcome!" ), QString(), cfg.alwaysExpandOptionalParts );
|
string result = makeHtmlHeader( tr( "Welcome!" ), QString(), cfg.alwaysExpandOptionalParts );
|
||||||
//tooltip
|
|
||||||
result += R"(<script src="qrc:///scripts/popper.min.js"></script>)";
|
|
||||||
result += R"(<script src="qrc:///scripts/tippy.min.js"></script>)";
|
|
||||||
result += R"(<link href="qrc:///tippy-light.css" rel="stylesheet">)";
|
|
||||||
|
|
||||||
|
|
||||||
result +=
|
result +=
|
||||||
tr(
|
tr(
|
||||||
|
@ -262,7 +257,7 @@ string ArticleMaker::makeWelcomeHtml() const
|
||||||
"<p>To start working with the program, first visit <b>Edit|Dictionaries</b> to add some directory paths where to search "
|
"<p>To start working with the program, first visit <b>Edit|Dictionaries</b> to add some directory paths where to search "
|
||||||
"for the dictionary files, set up various Wikipedia sites or other sources, adjust dictionary order or create dictionary groups."
|
"for the dictionary files, set up various Wikipedia sites or other sources, adjust dictionary order or create dictionary groups."
|
||||||
"<p>And then you're ready to look up your words! You can do that in this window "
|
"<p>And then you're ready to look up your words! You can do that in this window "
|
||||||
"by using a pane to the left, or you can <button id=\"lookup-popup\">look up words from other active applications</button>. "
|
"by using a pane to the left, or you can <a href=\"https://xiaoyifang.github.io/goldendict-ng/ui_popup/\">look up words from other active applications</a>. "
|
||||||
"<p>To customize program, check out the available preferences at <b>Edit|Preferences</b>. "
|
"<p>To customize program, check out the available preferences at <b>Edit|Preferences</b>. "
|
||||||
"All settings there have tooltips, be sure to read them if you are in doubt about anything."
|
"All settings there have tooltips, be sure to read them if you are in doubt about anything."
|
||||||
"<p>Should you need further help, have any questions, "
|
"<p>Should you need further help, have any questions, "
|
||||||
|
@ -302,19 +297,6 @@ string ArticleMaker::makeWelcomeHtml() const
|
||||||
theme = "light";
|
theme = "light";
|
||||||
}
|
}
|
||||||
|
|
||||||
result += QString(
|
|
||||||
R"(<script>
|
|
||||||
const template = document.getElementById('popup');
|
|
||||||
|
|
||||||
tippy('#lookup-popup', {
|
|
||||||
content: template.innerHTML,
|
|
||||||
allowHTML: true,
|
|
||||||
theme: '%1'
|
|
||||||
});
|
|
||||||
</script>)" )
|
|
||||||
.arg( theme )
|
|
||||||
.toStdString();
|
|
||||||
|
|
||||||
result += "</body></html>";
|
result += "</body></html>";
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|
6
src/scripts/popper.min.js
vendored
6
src/scripts/popper.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -7,8 +7,6 @@
|
||||||
<file>iframeResizer.contentWindow.min.js</file>
|
<file>iframeResizer.contentWindow.min.js</file>
|
||||||
<file>iframeResizer.min.js</file>
|
<file>iframeResizer.min.js</file>
|
||||||
<file>jquery-3.6.0.slim.min.js</file>
|
<file>jquery-3.6.0.slim.min.js</file>
|
||||||
<file>popper.min.js</file>
|
|
||||||
<file>tippy.min.js</file>
|
|
||||||
<file>mark.min.js</file>
|
<file>mark.min.js</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|
2
src/scripts/tippy.min.js
vendored
2
src/scripts/tippy.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -17,6 +17,5 @@
|
||||||
<file>qt-style-win.css</file>
|
<file>qt-style-win.css</file>
|
||||||
<file>qt-style.css</file>
|
<file>qt-style.css</file>
|
||||||
<file>article-style-darkmode.css</file>
|
<file>article-style-darkmode.css</file>
|
||||||
<file>tippy-light.css</file>
|
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|
|
@ -1,27 +0,0 @@
|
||||||
.tippy-box[data-theme~="light"] {
|
|
||||||
color: #26323d;
|
|
||||||
box-shadow:
|
|
||||||
0 0 20px 4px rgba(154, 161, 177, 0.15),
|
|
||||||
0 4px 80px -8px rgba(36, 40, 47, 0.25),
|
|
||||||
0 4px 4px -2px rgba(91, 94, 105, 0.15);
|
|
||||||
background-color: #fff;
|
|
||||||
}
|
|
||||||
.tippy-box[data-theme~="light"][data-placement^="top"] > .tippy-arrow:before {
|
|
||||||
border-top-color: #fff;
|
|
||||||
}
|
|
||||||
.tippy-box[data-theme~="light"][data-placement^="bottom"]
|
|
||||||
> .tippy-arrow:before {
|
|
||||||
border-bottom-color: #fff;
|
|
||||||
}
|
|
||||||
.tippy-box[data-theme~="light"][data-placement^="left"] > .tippy-arrow:before {
|
|
||||||
border-left-color: #fff;
|
|
||||||
}
|
|
||||||
.tippy-box[data-theme~="light"][data-placement^="right"] > .tippy-arrow:before {
|
|
||||||
border-right-color: #fff;
|
|
||||||
}
|
|
||||||
.tippy-box[data-theme~="light"] > .tippy-backdrop {
|
|
||||||
background-color: #fff;
|
|
||||||
}
|
|
||||||
.tippy-box[data-theme~="light"] > .tippy-svg-arrow {
|
|
||||||
fill: #fff;
|
|
||||||
}
|
|
Loading…
Reference in a new issue