Mercurial > hg > easyhg
diff src/changesetdetailitem.cpp @ 682:751b21af6b6f
Work around font mis-hinting when scaled on Windows
author | Chris Cannam |
---|---|
date | Fri, 07 Dec 2018 14:29:23 +0000 |
parents | ce29dc775650 |
children |
line wrap: on
line diff
--- a/src/changesetdetailitem.cpp Fri Dec 07 13:43:08 2018 +0000 +++ b/src/changesetdetailitem.cpp Fri Dec 07 14:29:23 2018 +0000 @@ -69,6 +69,9 @@ QWidget *) { paint->save(); + +#ifdef Q_OS_WIN32 +#endif ColourSet *colourSet = ColourSet::instance(); QColor branchColour = colourSet->getColourFor(m_changeset->branch()); @@ -76,6 +79,14 @@ QTransform t = paint->worldTransform(); float scale = std::min(t.m11(), t.m22()); +#ifdef Q_OS_WIN32 + QFont f(m_doc->defaultFont()); + f.setHintingPreference(scale != 1.0 ? + QFont::PreferVerticalHinting : + QFont::PreferDefaultHinting); + m_doc->setDefaultFont(f); +#endif + if (scale < 0.1) { paint->setPen(QPen(branchColour, 0)); } else {