chore: about dialog strings, also add a thanks tab

This commit is contained in:
Gary Wang 2020-10-05 20:43:30 +08:00
parent c78eb1a272
commit 5ace4e219c
6 changed files with 295 additions and 108 deletions

View File

@ -15,19 +15,26 @@ AboutDialog::AboutDialog(QWidget *parent)
, m_buttonBox(new QDialogButtonBox) , m_buttonBox(new QDialogButtonBox)
, m_helpTextEdit(new QTextBrowser) , m_helpTextEdit(new QTextBrowser)
, m_aboutTextEdit(new QTextBrowser) , m_aboutTextEdit(new QTextBrowser)
, m_specialThanksTextEdit(new QTextBrowser)
, m_licenseTextEdit(new QTextBrowser) , m_licenseTextEdit(new QTextBrowser)
, m_3rdPartyLibsTextEdit(new QTextBrowser)
{ {
this->setWindowTitle(tr("About")); this->setWindowTitle(tr("About"));
QStringList helpStr { QStringList helpStr {
tr("Launch application with image file path as argument to load the file."), QStringLiteral("<p>%1</p>").arg(tr("Launch application with image file path as argument to load the file.")),
tr("Drag and drop image file onto the window is also supported."), QStringLiteral("<p>%1</p>").arg(tr("Drag and drop image file onto the window is also supported.")),
"", QStringLiteral("<p>%1</p>").arg(tr("Context menu option explanation:")),
tr("Context menu option explanation:"), QStringLiteral("<ul>"),
("* " + QCoreApplication::translate("MainWindow", "Stay on top") + " : " QStringLiteral("<li><b>%1</b>:<br/>%2</li>").arg(
+ this->tr("Make window stay on top of all other windows.")), QCoreApplication::translate("MainWindow", "Stay on top"),
("* " + QCoreApplication::translate("MainWindow", "Protected mode") + " : " this->tr("Make window stay on top of all other windows.")
+ this->tr("Avoid close window accidentally. (eg. by double clicking the window)")) ),
QStringLiteral("<li><b>%1</b>:<br/>%2</li>").arg(
QCoreApplication::translate("MainWindow", "Protected mode"),
this->tr("Avoid close window accidentally. (eg. by double clicking the window)")
),
QStringLiteral("</ul>")
}; };
QStringList aboutStr { QStringList aboutStr {
@ -36,27 +43,42 @@ AboutDialog::AboutDialog(QWidget *parent)
#ifdef GIT_DESCRIBE_VERSION_STRING #ifdef GIT_DESCRIBE_VERSION_STRING
(QStringLiteral("<br/>") + tr("Version: %1").arg(GIT_DESCRIBE_VERSION_STRING)), (QStringLiteral("<br/>") + tr("Version: %1").arg(GIT_DESCRIBE_VERSION_STRING)),
#endif // GIT_DESCRIBE_VERSION_STRING #endif // GIT_DESCRIBE_VERSION_STRING
"<hr/>", QStringLiteral("<hr/>"),
tr("Copyright (c) 2020 %1").arg(QStringLiteral("<a href='https://github.com/BLumia'>@BLumia</a>")),
QStringLiteral("<br/>"),
tr("Logo designed by %1").arg(QStringLiteral("<a href='https://github.com/Lovelyblack'>@Lovelyblack</a>")),
QStringLiteral("<hr/>"),
tr("Built with Qt %1 (%2)").arg(QT_VERSION_STR, QSysInfo::buildCpuArchitecture()), tr("Built with Qt %1 (%2)").arg(QT_VERSION_STR, QSysInfo::buildCpuArchitecture()),
QStringLiteral("<br/><a href='%1'>%2</a>").arg("https://github.com/BLumia/pineapple-pictures", tr("Source code")), QStringLiteral("<br/><a href='%1'>%2</a>").arg("https://github.com/BLumia/pineapple-pictures", tr("Source code")),
"</center>" QStringLiteral("</center>")
}; };
QString licenseDescStr(tr( QStringList specialThanksStr {
"<p><i>%1</i> is released under the MIT License.</p>" QStringLiteral("<h1 align='center'>%1</h1><a href='%2'>%3</a><p>%4</p>").arg(
"<p>This license grants people a number of freedoms:</p>" tr("Contributors"),
"<ul>" QStringLiteral("https://github.com/BLumia/pineapple-pictures/graphs/contributors"),
"<li>You are free to use <i>%1</i>, for any purpose</li>" tr("List of contributors on GitHub"),
"<li>You are free to distribute <i>%1</i></li>" tr("Thanks to all people who contributed to this project.")
"<li>You can study how <i>%1</i> works and change it</li>" ),
"<li>You can distribute changed versions of <i>%1</i></li>" #if 0
"</ul>" QStringLiteral("<h1 align='center'>%1</h1><p>%2</p>").arg(
"<p>The MIT license guarantees you this freedom. Nobody is ever permitted to take it away.</p>" tr("Translators"),
)); tr("I would like to thank the following people who volunteered to translate this application.")
),
#endif
};
QStringList licenseStr { QStringList licenseStr {
QStringLiteral("<h1 align='center'><b>%1</b></h1>").arg(tr("Your Rights")), QStringLiteral("<h1 align='center'><b>%1</b></h1>").arg(tr("Your Rights")),
licenseDescStr, QStringLiteral("<p>%1</p><p>%2</p><ul><li>%3</li><li>%4</li><li>%5</li><li>%6</li></ul>").arg(
tr("%1 is released under the MIT License."), // %1
tr("This license grants people a number of freedoms:"), // %2
tr("You are free to use %1, for any purpose"), // %3
tr("You are free to distribute %1"), // %4
tr("You can study how %1 works and change it"), // %5
tr("You can distribute changed versions of %1") // %6
).arg(QStringLiteral("<i>%1</i>")),
QStringLiteral("<p>%1</p>").arg(tr("The MIT license guarantees you this freedom. Nobody is ever permitted to take it away.")),
QStringLiteral("<hr/><pre>%2</pre>") QStringLiteral("<hr/><pre>%2</pre>")
}; };
@ -83,16 +105,32 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. SOFTWARE.
)")); )"));
QStringList thirdPartyLibsStr {
QStringLiteral("<h1 align='center'><b>%1</b></h1>").arg(tr("Third-party Libraries used by %1")),
tr("%1 is built on the following free software libraries:"),
QStringLiteral("<ul>"),
QStringLiteral("<li><a href='%1'>%2</a>: %3</li>").arg("https://www.qt.io/", "Qt", "GPLv2 + GPLv3 + LGPLv2.1 + LGPLv3"),
QStringLiteral("</ul>")
};
m_helpTextEdit->setText(helpStr.join('\n')); m_helpTextEdit->setText(helpStr.join('\n'));
m_aboutTextEdit->setText(aboutStr.join('\n')); m_aboutTextEdit->setText(aboutStr.join('\n'));
m_aboutTextEdit->setOpenExternalLinks(true); m_aboutTextEdit->setOpenExternalLinks(true);
m_specialThanksTextEdit->setText(specialThanksStr.join('\n'));
m_specialThanksTextEdit->setOpenExternalLinks(true);
m_licenseTextEdit->setText(licenseStr.join('\n').arg(qApp->applicationDisplayName(), mitLicense)); m_licenseTextEdit->setText(licenseStr.join('\n').arg(qApp->applicationDisplayName(), mitLicense));
m_3rdPartyLibsTextEdit->setText(thirdPartyLibsStr.join('\n').arg(qApp->applicationDisplayName()));
m_3rdPartyLibsTextEdit->setOpenExternalLinks(true);
m_tabWidget->addTab(m_helpTextEdit, tr("&Help")); m_tabWidget->addTab(m_helpTextEdit, tr("&Help"));
m_tabWidget->addTab(m_aboutTextEdit, tr("&About")); m_tabWidget->addTab(m_aboutTextEdit, tr("&About"));
m_tabWidget->addTab(m_specialThanksTextEdit, tr("&Special Thanks"));
m_tabWidget->addTab(m_licenseTextEdit, tr("&License")); m_tabWidget->addTab(m_licenseTextEdit, tr("&License"));
m_tabWidget->addTab(m_3rdPartyLibsTextEdit, tr("&Third-party Libraries"));
m_buttonBox->setStandardButtons(QDialogButtonBox::Close); m_buttonBox->setStandardButtons(QDialogButtonBox::Close);
connect(m_buttonBox, QOverload<QAbstractButton *>::of(&QDialogButtonBox::clicked), this, [this](){ connect(m_buttonBox, QOverload<QAbstractButton *>::of(&QDialogButtonBox::clicked), this, [this](){
@ -106,7 +144,7 @@ SOFTWARE.
this->setLayout(mainLayout); this->setLayout(mainLayout);
this->setMinimumSize(361, 161); // not sure why it complain "Unable to set geometry" this->setMinimumSize(361, 161); // not sure why it complain "Unable to set geometry"
this->resize(520, 330); this->resize(520, 350);
setWindowFlag(Qt::WindowContextHelpButtonHint, false); setWindowFlag(Qt::WindowContextHelpButtonHint, false);
} }

View File

@ -22,7 +22,9 @@ private:
QTextBrowser * m_helpTextEdit = nullptr; QTextBrowser * m_helpTextEdit = nullptr;
QTextBrowser * m_aboutTextEdit = nullptr; QTextBrowser * m_aboutTextEdit = nullptr;
QTextBrowser * m_specialThanksTextEdit = nullptr;
QTextBrowser * m_licenseTextEdit = nullptr; QTextBrowser * m_licenseTextEdit = nullptr;
QTextBrowser * m_3rdPartyLibsTextEdit = nullptr;
}; };
#endif // ABOUTDIALOG_H #endif // ABOUTDIALOG_H

View File

@ -4,72 +4,157 @@
<context> <context>
<name>AboutDialog</name> <name>AboutDialog</name>
<message> <message>
<location filename="../aboutdialog.cpp" line="20"/> <location filename="../aboutdialog.cpp" line="22"/>
<source>About</source> <source>About</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../aboutdialog.cpp" line="23"/> <location filename="../aboutdialog.cpp" line="25"/>
<source>Launch application with image file path as argument to load the file.</source> <source>Launch application with image file path as argument to load the file.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../aboutdialog.cpp" line="24"/> <location filename="../aboutdialog.cpp" line="26"/>
<source>Drag and drop image file onto the window is also supported.</source> <source>Drag and drop image file onto the window is also supported.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../aboutdialog.cpp" line="26"/> <location filename="../aboutdialog.cpp" line="27"/>
<source>Context menu option explanation:</source> <source>Context menu option explanation:</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../aboutdialog.cpp" line="28"/> <location filename="../aboutdialog.cpp" line="31"/>
<source>Make window stay on top of all other windows.</source> <source>Make window stay on top of all other windows.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../aboutdialog.cpp" line="30"/> <location filename="../aboutdialog.cpp" line="35"/>
<source>Avoid close window accidentally. (eg. by double clicking the window)</source> <source>Avoid close window accidentally. (eg. by double clicking the window)</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../aboutdialog.cpp" line="37"/> <location filename="../aboutdialog.cpp" line="44"/>
<source>Version: %1</source> <source>Version: %1</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../aboutdialog.cpp" line="40"/> <location filename="../aboutdialog.cpp" line="47"/>
<source>Copyright (c) 2020 %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../aboutdialog.cpp" line="49"/>
<source>Logo designed by %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../aboutdialog.cpp" line="51"/>
<source>Built with Qt %1 (%2)</source> <source>Built with Qt %1 (%2)</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../aboutdialog.cpp" line="41"/> <location filename="../aboutdialog.cpp" line="52"/>
<source>Source code</source> <source>Source code</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../aboutdialog.cpp" line="45"/> <location filename="../aboutdialog.cpp" line="58"/>
<source>&lt;p&gt;&lt;i&gt;%1&lt;/i&gt; is released under the MIT License.&lt;/p&gt;&lt;p&gt;This license grants people a number of freedoms:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;You are free to use &lt;i&gt;%1&lt;/i&gt;, for any purpose&lt;/li&gt;&lt;li&gt;You are free to distribute &lt;i&gt;%1&lt;/i&gt;&lt;/li&gt;&lt;li&gt;You can study how &lt;i&gt;%1&lt;/i&gt; works and change it&lt;/li&gt;&lt;li&gt;You can distribute changed versions of &lt;i&gt;%1&lt;/i&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;The MIT license guarantees you this freedom. Nobody is ever permitted to take it away.&lt;/p&gt;</source> <source>Contributors</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../aboutdialog.cpp" line="58"/> <location filename="../aboutdialog.cpp" line="60"/>
<source>List of contributors on GitHub</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../aboutdialog.cpp" line="61"/>
<source>Thanks to all people who contributed to this project.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../aboutdialog.cpp" line="65"/>
<source>Translators</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../aboutdialog.cpp" line="66"/>
<source>I would like to thank the following people who volunteered to translate this application.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../aboutdialog.cpp" line="131"/>
<source>&amp;Special Thanks</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../aboutdialog.cpp" line="133"/>
<source>&amp;Third-party Libraries</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../aboutdialog.cpp" line="72"/>
<source>Your Rights</source> <source>Your Rights</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../aboutdialog.cpp" line="93"/> <location filename="../aboutdialog.cpp" line="74"/>
<source>%1 is released under the MIT License.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../aboutdialog.cpp" line="75"/>
<source>This license grants people a number of freedoms:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../aboutdialog.cpp" line="76"/>
<source>You are free to use %1, for any purpose</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../aboutdialog.cpp" line="77"/>
<source>You are free to distribute %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../aboutdialog.cpp" line="78"/>
<source>You can study how %1 works and change it</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../aboutdialog.cpp" line="79"/>
<source>You can distribute changed versions of %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../aboutdialog.cpp" line="81"/>
<source>The MIT license guarantees you this freedom. Nobody is ever permitted to take it away.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../aboutdialog.cpp" line="109"/>
<source>Third-party Libraries used by %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../aboutdialog.cpp" line="110"/>
<source>%1 is built on the following free software libraries:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../aboutdialog.cpp" line="129"/>
<source>&amp;Help</source> <source>&amp;Help</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../aboutdialog.cpp" line="94"/> <location filename="../aboutdialog.cpp" line="130"/>
<source>&amp;About</source> <source>&amp;About</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../aboutdialog.cpp" line="95"/> <location filename="../aboutdialog.cpp" line="132"/>
<source>&amp;License</source> <source>&amp;License</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -138,13 +223,13 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../aboutdialog.cpp" line="27"/> <location filename="../aboutdialog.cpp" line="30"/>
<location filename="../mainwindow.cpp" line="455"/> <location filename="../mainwindow.cpp" line="455"/>
<source>Stay on top</source> <source>Stay on top</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../aboutdialog.cpp" line="29"/> <location filename="../aboutdialog.cpp" line="34"/>
<location filename="../mainwindow.cpp" line="462"/> <location filename="../mainwindow.cpp" line="462"/>
<source>Protected mode</source> <source>Protected mode</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
@ -163,27 +248,32 @@
<context> <context>
<name>SettingsDialog</name> <name>SettingsDialog</name>
<message> <message>
<location filename="../settingsdialog.cpp" line="18"/> <location filename="../settingsdialog.cpp" line="15"/>
<source>Do nothing</source> <source>Settings</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../settingsdialog.cpp" line="19"/>
<source>Close the window</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../settingsdialog.cpp" line="20"/> <location filename="../settingsdialog.cpp" line="20"/>
<source>Do nothing</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../settingsdialog.cpp" line="21"/>
<source>Close the window</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../settingsdialog.cpp" line="22"/>
<source>Toggle maximize</source> <source>Toggle maximize</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../settingsdialog.cpp" line="28"/> <location filename="../settingsdialog.cpp" line="30"/>
<source>Stay on top when start-up</source> <source>Stay on top when start-up</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../settingsdialog.cpp" line="29"/> <location filename="../settingsdialog.cpp" line="31"/>
<source>Double-click behavior</source> <source>Double-click behavior</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>

View File

@ -4,72 +4,157 @@
<context> <context>
<name>AboutDialog</name> <name>AboutDialog</name>
<message> <message>
<location filename="../aboutdialog.cpp" line="20"/> <location filename="../aboutdialog.cpp" line="22"/>
<source>About</source> <source>About</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../aboutdialog.cpp" line="23"/> <location filename="../aboutdialog.cpp" line="25"/>
<source>Launch application with image file path as argument to load the file.</source> <source>Launch application with image file path as argument to load the file.</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../aboutdialog.cpp" line="24"/> <location filename="../aboutdialog.cpp" line="26"/>
<source>Drag and drop image file onto the window is also supported.</source> <source>Drag and drop image file onto the window is also supported.</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../aboutdialog.cpp" line="26"/> <location filename="../aboutdialog.cpp" line="27"/>
<source>Context menu option explanation:</source> <source>Context menu option explanation:</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../aboutdialog.cpp" line="28"/> <location filename="../aboutdialog.cpp" line="31"/>
<source>Make window stay on top of all other windows.</source> <source>Make window stay on top of all other windows.</source>
<translation>使</translation> <translation>使</translation>
</message> </message>
<message> <message>
<location filename="../aboutdialog.cpp" line="30"/> <location filename="../aboutdialog.cpp" line="35"/>
<source>Avoid close window accidentally. (eg. by double clicking the window)</source> <source>Avoid close window accidentally. (eg. by double clicking the window)</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../aboutdialog.cpp" line="37"/> <location filename="../aboutdialog.cpp" line="44"/>
<source>Version: %1</source> <source>Version: %1</source>
<translation>: %1</translation> <translation>: %1</translation>
</message> </message>
<message> <message>
<location filename="../aboutdialog.cpp" line="40"/> <location filename="../aboutdialog.cpp" line="47"/>
<source>Copyright (c) 2020 %1</source>
<translation> (c) 2020 %1</translation>
</message>
<message>
<location filename="../aboutdialog.cpp" line="49"/>
<source>Logo designed by %1</source>
<translation>Logo %1 </translation>
</message>
<message>
<location filename="../aboutdialog.cpp" line="51"/>
<source>Built with Qt %1 (%2)</source> <source>Built with Qt %1 (%2)</source>
<translation>使 Qt %1 (%2) </translation> <translation>使 Qt %1 (%2) </translation>
</message> </message>
<message> <message>
<location filename="../aboutdialog.cpp" line="41"/> <location filename="../aboutdialog.cpp" line="52"/>
<source>Source code</source> <source>Source code</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../aboutdialog.cpp" line="45"/> <location filename="../aboutdialog.cpp" line="58"/>
<source>&lt;p&gt;&lt;i&gt;%1&lt;/i&gt; is released under the MIT License.&lt;/p&gt;&lt;p&gt;This license grants people a number of freedoms:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;You are free to use &lt;i&gt;%1&lt;/i&gt;, for any purpose&lt;/li&gt;&lt;li&gt;You are free to distribute &lt;i&gt;%1&lt;/i&gt;&lt;/li&gt;&lt;li&gt;You can study how &lt;i&gt;%1&lt;/i&gt; works and change it&lt;/li&gt;&lt;li&gt;You can distribute changed versions of &lt;i&gt;%1&lt;/i&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;The MIT license guarantees you this freedom. Nobody is ever permitted to take it away.&lt;/p&gt;</source> <source>Contributors</source>
<translation>&lt;p&gt;&lt;i&gt;%1&lt;/i&gt; MIT &lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;使 &lt;i&gt;%1&lt;/i&gt;&lt;/li&gt;&lt;li&gt; &lt;i&gt;%1&lt;/i&gt;&lt;/li&gt;&lt;li&gt; &lt;i&gt;%1&lt;/i&gt; &lt;/li&gt;&lt;li&gt; &lt;i&gt;%1&lt;/i&gt; &lt;/li&gt;&lt;/ul&gt;&lt;p&gt; MIT &lt;/p&gt;</translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../aboutdialog.cpp" line="58"/> <location filename="../aboutdialog.cpp" line="60"/>
<source>List of contributors on GitHub</source>
<translation>GitHub </translation>
</message>
<message>
<location filename="../aboutdialog.cpp" line="61"/>
<source>Thanks to all people who contributed to this project.</source>
<translation></translation>
</message>
<message>
<location filename="../aboutdialog.cpp" line="65"/>
<source>Translators</source>
<translation></translation>
</message>
<message>
<location filename="../aboutdialog.cpp" line="66"/>
<source>I would like to thank the following people who volunteered to translate this application.</source>
<translation></translation>
</message>
<message>
<location filename="../aboutdialog.cpp" line="131"/>
<source>&amp;Special Thanks</source>
<translation>(&amp;S)</translation>
</message>
<message>
<location filename="../aboutdialog.cpp" line="133"/>
<source>&amp;Third-party Libraries</source>
<translation>(&amp;T)</translation>
</message>
<message>
<location filename="../aboutdialog.cpp" line="72"/>
<source>Your Rights</source> <source>Your Rights</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../aboutdialog.cpp" line="93"/> <location filename="../aboutdialog.cpp" line="74"/>
<source>%1 is released under the MIT License.</source>
<translation>%1 MIT </translation>
</message>
<message>
<location filename="../aboutdialog.cpp" line="75"/>
<source>This license grants people a number of freedoms:</source>
<translation></translation>
</message>
<message>
<location filename="../aboutdialog.cpp" line="76"/>
<source>You are free to use %1, for any purpose</source>
<translation>使 %1</translation>
</message>
<message>
<location filename="../aboutdialog.cpp" line="77"/>
<source>You are free to distribute %1</source>
<translation> %1</translation>
</message>
<message>
<location filename="../aboutdialog.cpp" line="78"/>
<source>You can study how %1 works and change it</source>
<translation> %1 </translation>
</message>
<message>
<location filename="../aboutdialog.cpp" line="79"/>
<source>You can distribute changed versions of %1</source>
<translation> %1 </translation>
</message>
<message>
<location filename="../aboutdialog.cpp" line="81"/>
<source>The MIT license guarantees you this freedom. Nobody is ever permitted to take it away.</source>
<translation> MIT </translation>
</message>
<message>
<location filename="../aboutdialog.cpp" line="109"/>
<source>Third-party Libraries used by %1</source>
<translation>%1 使</translation>
</message>
<message>
<location filename="../aboutdialog.cpp" line="110"/>
<source>%1 is built on the following free software libraries:</source>
<translation>%1 </translation>
</message>
<message>
<location filename="../aboutdialog.cpp" line="129"/>
<source>&amp;Help</source> <source>&amp;Help</source>
<translation>(&amp;H)</translation> <translation>(&amp;H)</translation>
</message> </message>
<message> <message>
<location filename="../aboutdialog.cpp" line="94"/> <location filename="../aboutdialog.cpp" line="130"/>
<source>&amp;About</source> <source>&amp;About</source>
<translation>(&amp;A)</translation> <translation>(&amp;A)</translation>
</message> </message>
<message> <message>
<location filename="../aboutdialog.cpp" line="95"/> <location filename="../aboutdialog.cpp" line="132"/>
<source>&amp;License</source> <source>&amp;License</source>
<translation>(&amp;L)</translation> <translation>(&amp;L)</translation>
</message> </message>
@ -117,10 +202,6 @@
<source>&amp;Copy</source> <source>&amp;Copy</source>
<translation>(&amp;C)</translation> <translation>(&amp;C)</translation>
</message> </message>
<message>
<source>Copy &amp;Pixmap</source>
<translation type="vanished">(&amp;P)</translation>
</message>
<message> <message>
<location filename="../mainwindow.cpp" line="429"/> <location filename="../mainwindow.cpp" line="429"/>
<source>Copy P&amp;ixmap</source> <source>Copy P&amp;ixmap</source>
@ -142,13 +223,13 @@
<translation>(&amp;P)</translation> <translation>(&amp;P)</translation>
</message> </message>
<message> <message>
<location filename="../aboutdialog.cpp" line="27"/> <location filename="../aboutdialog.cpp" line="30"/>
<location filename="../mainwindow.cpp" line="455"/> <location filename="../mainwindow.cpp" line="455"/>
<source>Stay on top</source> <source>Stay on top</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../aboutdialog.cpp" line="29"/> <location filename="../aboutdialog.cpp" line="34"/>
<location filename="../mainwindow.cpp" line="462"/> <location filename="../mainwindow.cpp" line="462"/>
<source>Protected mode</source> <source>Protected mode</source>
<translation></translation> <translation></translation>
@ -163,62 +244,36 @@
<source>Help</source> <source>Help</source>
<translation></translation> <translation></translation>
</message> </message>
<message>
<source>Launch application with image file path as argument to load the file.</source>
<translation type="vanished"></translation>
</message>
<message>
<source>Drag and drop image file onto the window is also supported.</source>
<translation type="vanished"></translation>
</message>
<message>
<source>Context menu option explanation:</source>
<translation type="vanished"></translation>
</message>
<message>
<source>Make window stay on top of all other windows.</source>
<translation type="vanished">使</translation>
</message>
<message>
<source>Avoid close window accidentally. (eg. by double clicking the window)</source>
<translation type="vanished"></translation>
</message>
</context>
<context>
<name>QCoreApplication</name>
<message>
<source>Make window stay on top of all other windows.</source>
<translation type="vanished">使</translation>
</message>
<message>
<source>Avoid close window accidentally. (eg. by double clicking the window)</source>
<translation type="vanished"></translation>
</message>
</context> </context>
<context> <context>
<name>SettingsDialog</name> <name>SettingsDialog</name>
<message> <message>
<location filename="../settingsdialog.cpp" line="18"/> <location filename="../settingsdialog.cpp" line="15"/>
<source>Settings</source>
<translation></translation>
</message>
<message>
<location filename="../settingsdialog.cpp" line="20"/>
<source>Do nothing</source> <source>Do nothing</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../settingsdialog.cpp" line="19"/> <location filename="../settingsdialog.cpp" line="21"/>
<source>Close the window</source> <source>Close the window</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../settingsdialog.cpp" line="20"/> <location filename="../settingsdialog.cpp" line="22"/>
<source>Toggle maximize</source> <source>Toggle maximize</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../settingsdialog.cpp" line="28"/> <location filename="../settingsdialog.cpp" line="30"/>
<source>Stay on top when start-up</source> <source>Stay on top when start-up</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../settingsdialog.cpp" line="29"/> <location filename="../settingsdialog.cpp" line="31"/>
<source>Double-click behavior</source> <source>Double-click behavior</source>
<translation></translation> <translation></translation>
</message> </message>

View File

@ -37,7 +37,7 @@ MainWindow::MainWindow(QWidget *parent) :
} }
this->setAttribute(Qt::WA_TranslucentBackground, true); this->setAttribute(Qt::WA_TranslucentBackground, true);
this->setMinimumSize(350, 350); this->setMinimumSize(350, 330);
this->setWindowIcon(QIcon(":/icons/app-icon.svg")); this->setWindowIcon(QIcon(":/icons/app-icon.svg"));
this->setMouseTracking(true); this->setMouseTracking(true);

View File

@ -12,6 +12,8 @@ SettingsDialog::SettingsDialog(QWidget *parent)
, m_stayOnTop(new QCheckBox) , m_stayOnTop(new QCheckBox)
, m_doubleClickBehavior(new QComboBox) , m_doubleClickBehavior(new QComboBox)
{ {
this->setWindowTitle(tr("Settings"));
QFormLayout * settingsForm = new QFormLayout(this); QFormLayout * settingsForm = new QFormLayout(this);
static QMap<DoubleClickBehavior, QString> _map { static QMap<DoubleClickBehavior, QString> _map {