diff options
author | Marco Bubke <marco.bubke@nokia.com> | 2010-01-06 12:46:15 (GMT) |
---|---|---|
committer | Marco Bubke <marco.bubke@nokia.com> | 2010-01-06 12:51:13 (GMT) |
commit | 82639859d2fa69c8d7c464a29a8f9cd5d284bb9d (patch) | |
tree | 67b5c62e6485ee9e365940e3175d1ae7c289b06c | |
parent | 67b5fe0afbf7d32f845261690faa6b8554a2e308 (diff) | |
download | Qt-82639859d2fa69c8d7c464a29a8f9cd5d284bb9d.zip Qt-82639859d2fa69c8d7c464a29a8f9cd5d284bb9d.tar.gz Qt-82639859d2fa69c8d7c464a29a8f9cd5d284bb9d.tar.bz2 |
Allow Bauhaus to reset hasPixelSize
We want to reset the pixelSize to a pointSize value.
Task-number: BAUHAUS-244
Reviewed-by: Kai Koehne
-rw-r--r-- | src/declarative/qml/qmlvaluetype.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/declarative/qml/qmlvaluetype.cpp b/src/declarative/qml/qmlvaluetype.cpp index 6d08cd1..058fd6e 100644 --- a/src/declarative/qml/qmlvaluetype.cpp +++ b/src/declarative/qml/qmlvaluetype.cpp @@ -583,7 +583,9 @@ void QmlFontValueType::setPointSize(qreal size) qWarning() << "Both point size and pixel size set. Using pixel size."; return; } - font.setPointSizeF(size); + + if (size >= 0.0) + font.setPointSizeF(size); } int QmlFontValueType::pixelSize() const @@ -593,8 +595,12 @@ int QmlFontValueType::pixelSize() const void QmlFontValueType::setPixelSize(int size) { - font.setPixelSize(size); - hasPixelSize = true; + if (size >=0) { + font.setPixelSize(size); + hasPixelSize = true; + } else { + hasPixelSize = false; + } } QmlFontValueType::Capitalization QmlFontValueType::capitalization() const |