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_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);
}

View File

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

View File

@ -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"/>
<source>Do nothing</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../settingsdialog.cpp" line="19"/>
<source>Close the window</source>
<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="21"/>
<source>Close the window</source>
<translation type="unfinished"></translation>
</message>
<message>
<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>

View File

@ -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="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>
<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>
<message>
<source>Avoid close window accidentally. (eg. by double clicking the window)</source>
<translation type="vanished"></translation>
</message>
</context>
<context>
<name>SettingsDialog</name>
<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>
<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>

View File

@ -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);

View File

@ -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 {