Duplicating text spaces after dot only for Mac (#6914)

* duplicating text spaces after dot

* updated changelog

* implemented suggestion

Co-authored-by: SerhiiGadzhilov <71632867+SerhiiGadzhilov@users.noreply.github.com>
This commit is contained in:
Ignacio Rodríguez 2021-01-21 17:46:01 +07:00 committed by GitHub
parent 577bb9f492
commit 9f5f0276d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 26 additions and 3 deletions

View File

@ -4,6 +4,7 @@ Bug fixes:
- #6900 Remaining SonarCloud reported bug items
- #6903 Save global settings
- #6889 Systray Icon on Ubuntu Auto Start (take 2)
- #6914 Fix for Qt Word Wrap on Mac
Enhancements:
- #6912 Removes UI for Screen Saver Sync and Files Drag and Drop

View File

@ -37,6 +37,9 @@ SetupWizard::SetupWizard(MainWindow& mainWindow, bool startMain) :
resize(600, 500);
setMinimumSize(size());
// additionally, we identified an issue with presenting dots, see SYNERGY-719
duplicateSpaces();
#elif defined(Q_OS_WIN)
// when areo is disabled on windows, the next/back buttons
@ -146,4 +149,19 @@ void SetupWizard::on_m_pComboLanguage_currentIndexChanged(int index)
{
QString ietfCode = m_pComboLanguage->itemData(index).toString();
QSynergyApplication::getInstance()->switchTranslator(ietfCode);
#if defined(Q_OS_MAC)
duplicateSpaces();
#endif // defined(Q_OS_MAC)
}
#if defined(Q_OS_MAC)
void SetupWizard::duplicateSpaces()
{
auto list = this->findChildren<QLabel *>();
foreach(QLabel *l, list) {
if (l->wordWrap()) {
l->setText(l->text().replace(". ", ". "));
}
}
}
#endif // defined(Q_OS_MAC)

View File

@ -48,6 +48,10 @@ private:
bool m_StartMain;
SynergyLocale m_Locale;
#if defined(Q_OS_MAC)
void duplicateSpaces();
#endif // defined(Q_OS_MAC)
private slots:
void on_m_pComboLanguage_currentIndexChanged(int index);
};

View File

@ -97,11 +97,11 @@ int main(int argc, char* argv[])
QObject::connect(dynamic_cast<QObject*>(&app), SIGNAL(aboutToQuit()),
&mainWindow, SLOT(saveSettings()));
SetupWizard setupWizard(mainWindow, true);
std::unique_ptr<SetupWizard> setupWizard;
if (appConfig.wizardShouldRun())
{
setupWizard.show();
setupWizard.reset(new SetupWizard(mainWindow, true));
setupWizard->show();
}
else
{