mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 19:24:08 +00:00
Merge pull request #1331 from xiaoyifang/opt/scanpopup
opt: use link instead of button and tooltip
This commit is contained in:
commit
a7eff055c8
|
@ -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;
|
|
||||||
}
|
|
|
@ -1,4 +1,4 @@
|
||||||
# Use vcpkg to build ffmpeg.
|
# Use vcpkg to build ffmpeg(on Windows).
|
||||||
|
|
||||||
Steps:
|
Steps:
|
||||||
|
|
||||||
|
@ -23,17 +23,6 @@ Then replace the dlls and libs in the winlibs\lib\msvc.
|
||||||
**Pros**: Easy to manage.
|
**Pros**: Easy to manage.
|
||||||
|
|
||||||
|
|
||||||
# I have tried the following methods without success
|
|
||||||
|
|
||||||
## Use the scripts provided by the following url
|
|
||||||
|
|
||||||
https://github.com/Microsoft/FFmpegInterop/issues/67
|
|
||||||
|
|
||||||
https://github.com/Microsoft/FFmpegInterop
|
|
||||||
|
|
||||||
|
|
||||||
did not know how to link to libspeex.
|
|
||||||
|
|
||||||
## conan
|
## conan
|
||||||
|
|
||||||
conan does not seem to have the libspeex option yet.
|
conan does not seem to have the libspeex option yet.
|
||||||
|
|
Loading…
Reference in a new issue