diff --git a/src/preference/prefmanage.cpp b/src/preference/prefmanage.cpp index 3a45265..eed39f3 100644 --- a/src/preference/prefmanage.cpp +++ b/src/preference/prefmanage.cpp @@ -405,6 +405,9 @@ void PrefManage::on_cbLanuage_currentTextChanged(const QString &language) const QString strLanuage = btn->itemData(btn->currentIndex()).toString(); DATAMAID->setParaValue("lanuage", strLanuage); + auto t = DATAMAID->paraValue("font").value(); + + QTranslator trans; QString qmPath(qApp->applicationDirPath()); #if defined(Q_OS_MAC) @@ -416,6 +419,15 @@ void PrefManage::on_cbLanuage_currentTextChanged(const QString &language) qApp->installTranslator(&trans); ui->retranslateUi(this); + ui->btnFont->setText(DATAMAID->paraValue("font").value()); // fix: 切换后文本空白; 没有 tr 放于 retranslateUi 后 + + QString bit; + if (_BIT_ARCH == 4) bit = "x86"; + else if (_BIT_ARCH == 8) bit = "x64"; + ui->labVersion->setText(QString("%1-Beta %2 (%3)") + .arg(_PROJECT_VERSION) + .arg(bit) + .arg(_VERSION_BUILD_TIME)); } diff --git a/src/preference/prefmanage.ui b/src/preference/prefmanage.ui index 51ace73..41b0cf2 100644 --- a/src/preference/prefmanage.ui +++ b/src/preference/prefmanage.ui @@ -29,7 +29,7 @@ QTabWidget::Rounded - 4 + 0 @@ -1136,6 +1136,9 @@ simple and beautiful cross-platform screenshot software. + + Qt::AlignCenter + diff --git a/src/screen/tray.cpp b/src/screen/tray.cpp index a3584a5..1d2fb40 100644 --- a/src/screen/tray.cpp +++ b/src/screen/tray.cpp @@ -186,7 +186,11 @@ void Tray::onPreference(bool checked) m_pPref->setVisible(true); m_pPref->adjustSize(); + +#ifdef Q_OS_WIN m_pPref->setFixedSize(m_pPref->size()); +#endif + } void Tray::onKeySequenceChanged(const QKeySequence& keySequence) @@ -246,7 +250,8 @@ void Tray::onNotificHotkeyRegisteredFail(std::map QString msg; for (const auto& it: map) { msg += (it.first + ": " + it.second + "\n"); - msg.left(msg.lastIndexOf('\n')); + auto t = msg.lastIndexOf('\n'); + msg.left(t); } m_trayIcon->showMessage(title, msg, QIcon(":/resources/Logo.png"), 6000);