Skip to content

Commit

Permalink
fontDescription now shows point or pixel size.
Browse files Browse the repository at this point in the history
  • Loading branch information
albar965 committed Jun 22, 2020
1 parent 43c03ce commit 3809489
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/gui/tools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,10 @@ QString fontDescription(const QFont& font)
QStringList fontText;

fontText.append(font.family());
fontText.append(QLocale().toString(font.pointSizeF()));
if(font.pointSizeF() > 0.)
fontText.append(QObject::tr("%1 pt").arg(font.pointSizeF()));
else if(font.pixelSize() > 0)
fontText.append(QObject::tr("%1 px").arg(font.pixelSize()));

int weight = font.weight();
if(weight == QFont::Thin)
Expand Down

0 comments on commit 3809489

Please sign in to comment.