Skip to content

Commit

Permalink
chore: about dialog strings, also add a thanks tab
Browse files Browse the repository at this point in the history
BLumia committed Oct 5, 2020
1 parent c78eb1a commit 5ace4e2
Showing 6 changed files with 290 additions and 103 deletions.
84 changes: 61 additions & 23 deletions aboutdialog.cpp
Original file line number Diff line number Diff line change
@@ -15,19 +15,26 @@ AboutDialog::AboutDialog(QWidget *parent)
, m_buttonBox(new QDialogButtonBox)
, m_helpTextEdit(new QTextBrowser)
, m_aboutTextEdit(new QTextBrowser)
, m_specialThanksTextEdit(new QTextBrowser)
, m_licenseTextEdit(new QTextBrowser)
, m_3rdPartyLibsTextEdit(new QTextBrowser)
{
this->setWindowTitle(tr("About"));

QStringList helpStr {
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."),
"",
tr("Context menu option explanation:"),
("* " + QCoreApplication::translate("MainWindow", "Stay on top") + " : "
+ this->tr("Make window stay on top of all other windows.")),
("* " + QCoreApplication::translate("MainWindow", "Protected mode") + " : "
+ this->tr("Avoid close window accidentally. (eg. by double clicking the window)"))
QStringLiteral("<p>%1</p>").arg(tr("Launch application with image file path as argument to load the file.")),
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:")),
QStringLiteral("<ul>"),
QStringLiteral("<li><b>%1</b>:<br/>%2</li>").arg(
QCoreApplication::translate("MainWindow", "Stay on top"),
this->tr("Make window stay on top of all other windows.")
),
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 {
@@ -36,27 +43,42 @@ AboutDialog::AboutDialog(QWidget *parent)
#ifdef GIT_DESCRIBE_VERSION_STRING
(QStringLiteral("<br/>") + tr("Version: %1").arg(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()),
QStringLiteral("<br/><a href='%1'>%2</a>").arg("https://github.com/BLumia/pineapple-pictures", tr("Source code")),
"</center>"
QStringLiteral("</center>")
};

QString licenseDescStr(tr(
"<p><i>%1</i> is released under the MIT License.</p>"
"<p>This license grants people a number of freedoms:</p>"
"<ul>"
"<li>You are free to use <i>%1</i>, for any purpose</li>"
"<li>You are free to distribute <i>%1</i></li>"
"<li>You can study how <i>%1</i> works and change it</li>"
"<li>You can distribute changed versions of <i>%1</i></li>"
"</ul>"
"<p>The MIT license guarantees you this freedom. Nobody is ever permitted to take it away.</p>"
));
QStringList specialThanksStr {
QStringLiteral("<h1 align='center'>%1</h1><a href='%2'>%3</a><p>%4</p>").arg(
tr("Contributors"),
QStringLiteral("https://github.com/BLumia/pineapple-pictures/graphs/contributors"),
tr("List of contributors on GitHub"),
tr("Thanks to all people who contributed to this project.")
),
#if 0
QStringLiteral("<h1 align='center'>%1</h1><p>%2</p>").arg(
tr("Translators"),
tr("I would like to thank the following people who volunteered to translate this application.")
),
#endif
};

QStringList licenseStr {
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>")
};

@@ -83,16 +105,32 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
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_aboutTextEdit->setText(aboutStr.join('\n'));
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_3rdPartyLibsTextEdit->setText(thirdPartyLibsStr.join('\n').arg(qApp->applicationDisplayName()));
m_3rdPartyLibsTextEdit->setOpenExternalLinks(true);

m_tabWidget->addTab(m_helpTextEdit, tr("&Help"));
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_3rdPartyLibsTextEdit, tr("&Third-party Libraries"));

m_buttonBox->setStandardButtons(QDialogButtonBox::Close);
connect(m_buttonBox, QOverload<QAbstractButton *>::of(&QDialogButtonBox::clicked), this, [this](){
@@ -106,7 +144,7 @@ SOFTWARE.

this->setLayout(mainLayout);
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);
}

2 changes: 2 additions & 0 deletions aboutdialog.h
Original file line number Diff line number Diff line change
@@ -22,7 +22,9 @@ class AboutDialog : public QDialog

QTextBrowser * m_helpTextEdit = nullptr;
QTextBrowser * m_aboutTextEdit = nullptr;
QTextBrowser * m_specialThanksTextEdit = nullptr;
QTextBrowser * m_licenseTextEdit = nullptr;
QTextBrowser * m_3rdPartyLibsTextEdit = nullptr;
};

#endif // ABOUTDIALOG_H
134 changes: 112 additions & 22 deletions languages/PineapplePictures.ts
Original file line number Diff line number Diff line change
@@ -4,72 +4,157 @@
<context>
<name>AboutDialog</name>
<message>
<location filename="../aboutdialog.cpp" line="20"/>
<location filename="../aboutdialog.cpp" line="22"/>
<source>About</source>
<translation type="unfinished"></translation>
</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>
<translation type="unfinished"></translation>
</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>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../aboutdialog.cpp" line="26"/>
<location filename="../aboutdialog.cpp" line="27"/>
<source>Context menu option explanation:</source>
<translation type="unfinished"></translation>
</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>
<translation type="unfinished"></translation>
</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>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../aboutdialog.cpp" line="37"/>
<location filename="../aboutdialog.cpp" line="44"/>
<source>Version: %1</source>
<translation type="unfinished"></translation>
</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>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../aboutdialog.cpp" line="41"/>
<location filename="../aboutdialog.cpp" line="52"/>
<source>Source code</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../aboutdialog.cpp" line="45"/>
<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>
<location filename="../aboutdialog.cpp" line="58"/>
<source>Contributors</source>
<translation type="unfinished"></translation>
</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>
<translation type="unfinished"></translation>
</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>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../aboutdialog.cpp" line="94"/>
<location filename="../aboutdialog.cpp" line="130"/>
<source>&amp;About</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../aboutdialog.cpp" line="95"/>
<location filename="../aboutdialog.cpp" line="132"/>
<source>&amp;License</source>
<translation type="unfinished"></translation>
</message>
@@ -138,13 +223,13 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../aboutdialog.cpp" line="27"/>
<location filename="../aboutdialog.cpp" line="30"/>
<location filename="../mainwindow.cpp" line="455"/>
<source>Stay on top</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../aboutdialog.cpp" line="29"/>
<location filename="../aboutdialog.cpp" line="34"/>
<location filename="../mainwindow.cpp" line="462"/>
<source>Protected mode</source>
<translation type="unfinished"></translation>
@@ -163,27 +248,32 @@
<context>
<name>SettingsDialog</name>
<message>
<location filename="../settingsdialog.cpp" line="18"/>
<location filename="../settingsdialog.cpp" line="15"/>
<source>Settings</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../settingsdialog.cpp" line="20"/>
<source>Do nothing</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../settingsdialog.cpp" line="19"/>
<location filename="../settingsdialog.cpp" line="21"/>
<source>Close the window</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../settingsdialog.cpp" line="20"/>
<location filename="../settingsdialog.cpp" line="22"/>
<source>Toggle maximize</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../settingsdialog.cpp" line="28"/>
<location filename="../settingsdialog.cpp" line="30"/>
<source>Stay on top when start-up</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../settingsdialog.cpp" line="29"/>
<location filename="../settingsdialog.cpp" line="31"/>
<source>Double-click behavior</source>
<translation type="unfinished"></translation>
</message>
169 changes: 112 additions & 57 deletions languages/PineapplePictures_zh_CN.ts
Original file line number Diff line number Diff line change
@@ -4,72 +4,157 @@
<context>
<name>AboutDialog</name>
<message>
<location filename="../aboutdialog.cpp" line="20"/>
<location filename="../aboutdialog.cpp" line="22"/>
<source>About</source>
<translation>关于</translation>
</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>
<translation>以图片文件的路径作为参数运行程序即可直接打开图片文件。</translation>
</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>
<translation>也支持拖放图片文件到窗口内来加载图片。</translation>
</message>
<message>
<location filename="../aboutdialog.cpp" line="26"/>
<location filename="../aboutdialog.cpp" line="27"/>
<source>Context menu option explanation:</source>
<translation>菜单项说明:</translation>
</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>
<translation>使窗口始终至于其它非置顶窗口上方。</translation>
</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>
<translation>避免窗口意外关闭。(如:不小心双击了窗口触发了关闭窗口行为)</translation>
</message>
<message>
<location filename="../aboutdialog.cpp" line="37"/>
<location filename="../aboutdialog.cpp" line="44"/>
<source>Version: %1</source>
<translation>版本: %1</translation>
</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>
<translation>使用 Qt %1 (%2) 进行构建</translation>
</message>
<message>
<location filename="../aboutdialog.cpp" line="41"/>
<location filename="../aboutdialog.cpp" line="52"/>
<source>Source code</source>
<translation>源代码</translation>
</message>
<message>
<location filename="../aboutdialog.cpp" line="45"/>
<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>
<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>
<location filename="../aboutdialog.cpp" line="58"/>
<source>Contributors</source>
<translation>贡献者</translation>
</message>
<message>
<location filename="../aboutdialog.cpp" line="60"/>
<source>List of contributors on GitHub</source>
<translation>GitHub 上的贡献者列表</translation>
</message>
<message>
<location filename="../aboutdialog.cpp" line="58"/>
<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>
<translation>用户的权利</translation>
</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>
<translation>帮助(&amp;H)</translation>
</message>
<message>
<location filename="../aboutdialog.cpp" line="94"/>
<location filename="../aboutdialog.cpp" line="130"/>
<source>&amp;About</source>
<translation>关于(&amp;A)</translation>
</message>
<message>
<location filename="../aboutdialog.cpp" line="95"/>
<location filename="../aboutdialog.cpp" line="132"/>
<source>&amp;License</source>
<translation>软件许可证(&amp;L)</translation>
</message>
@@ -117,10 +202,6 @@
<source>&amp;Copy</source>
<translation>复制(&amp;C)</translation>
</message>
<message>
<source>Copy &amp;Pixmap</source>
<translation type="vanished">复制位图(&amp;P)</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="429"/>
<source>Copy P&amp;ixmap</source>
@@ -142,13 +223,13 @@
<translation>粘贴图像文件(&amp;P)</translation>
</message>
<message>
<location filename="../aboutdialog.cpp" line="27"/>
<location filename="../aboutdialog.cpp" line="30"/>
<location filename="../mainwindow.cpp" line="455"/>
<source>Stay on top</source>
<translation>总在最前</translation>
</message>
<message>
<location filename="../aboutdialog.cpp" line="29"/>
<location filename="../aboutdialog.cpp" line="34"/>
<location filename="../mainwindow.cpp" line="462"/>
<source>Protected mode</source>
<translation>保护模式</translation>
@@ -163,62 +244,36 @@
<source>Help</source>
<translation>帮助</translation>
</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>
<name>SettingsDialog</name>
<message>
<source>Avoid close window accidentally. (eg. by double clicking the window)</source>
<translation type="vanished">避免窗口意外关闭。(如:不小心双击了窗口触发了关闭窗口行为)</translation>
<location filename="../settingsdialog.cpp" line="15"/>
<source>Settings</source>
<translation>设定</translation>
</message>
</context>
<context>
<name>SettingsDialog</name>
<message>
<location filename="../settingsdialog.cpp" line="18"/>
<location filename="../settingsdialog.cpp" line="20"/>
<source>Do nothing</source>
<translation>什么也不做</translation>
</message>
<message>
<location filename="../settingsdialog.cpp" line="19"/>
<location filename="../settingsdialog.cpp" line="21"/>
<source>Close the window</source>
<translation>关闭窗口</translation>
</message>
<message>
<location filename="../settingsdialog.cpp" line="20"/>
<location filename="../settingsdialog.cpp" line="22"/>
<source>Toggle maximize</source>
<translation>最大化窗口</translation>
</message>
<message>
<location filename="../settingsdialog.cpp" line="28"/>
<location filename="../settingsdialog.cpp" line="30"/>
<source>Stay on top when start-up</source>
<translation>启动时保持窗口总在最前</translation>
</message>
<message>
<location filename="../settingsdialog.cpp" line="29"/>
<location filename="../settingsdialog.cpp" line="31"/>
<source>Double-click behavior</source>
<translation>双击时的行为</translation>
</message>
2 changes: 1 addition & 1 deletion mainwindow.cpp
Original file line number Diff line number Diff line change
@@ -37,7 +37,7 @@ MainWindow::MainWindow(QWidget *parent) :
}

this->setAttribute(Qt::WA_TranslucentBackground, true);
this->setMinimumSize(350, 350);
this->setMinimumSize(350, 330);
this->setWindowIcon(QIcon(":/icons/app-icon.svg"));
this->setMouseTracking(true);

2 changes: 2 additions & 0 deletions settingsdialog.cpp
Original file line number Diff line number Diff line change
@@ -12,6 +12,8 @@ SettingsDialog::SettingsDialog(QWidget *parent)
, m_stayOnTop(new QCheckBox)
, m_doubleClickBehavior(new QComboBox)
{
this->setWindowTitle(tr("Settings"));

QFormLayout * settingsForm = new QFormLayout(this);

static QMap<DoubleClickBehavior, QString> _map {

0 comments on commit 5ace4e2

Please sign in to comment.