Contournement du bug #2 : les polices ayant une taille inferieure ou egale a 4 se voient desormais attribuer une epaisseur plus fine.

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@584 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
xavier
2009-04-12 17:21:19 +00:00
parent 635e720181
commit 70c64000a8
7 changed files with 30 additions and 28 deletions

View File

@@ -53,7 +53,7 @@ void PartTextField::fromXml(const QDomElement &xml_element) {
int font_size = xml_element.attribute("size").toInt(&ok);
if (!ok || font_size < 1) font_size = 20;
setFont(QFont(QString(QETApp::diagramTextsFont()), font_size));
setFont(QETApp::diagramTextsFont(font_size));
setPlainText(xml_element.attribute("text"));
setPos(
xml_element.attribute("x").toDouble(),
@@ -199,7 +199,7 @@ void PartTextField::setProperty(const QString &property, const QVariant &value)
setPos(pos().x(), value.toDouble());
} else if (property == "size") {
if (!value.canConvert(QVariant::Int)) return;
setFont(QFont(font().family(), value.toInt()));
setFont(QETApp::diagramTextsFont(value.toInt()));
} else if (property == "text") {
setPlainText(value.toString());
} else if (property == "rotate") {