From efe920cb2873facc7f9b21f77b678628e9c3dcb2 Mon Sep 17 00:00:00 2001 From: Yann Bodson Date: Thu, 20 Aug 2009 16:29:04 +1000 Subject: Update documentation regarding font.pointSize --- doc/src/snippets/declarative/comments.qml | 2 +- .../declarative/pathview/pathattributes.qml | 2 +- doc/src/snippets/declarative/pathview/pathview.qml | 2 +- src/declarative/fx/qfxtext.cpp | 24 +++++++++++----------- src/declarative/fx/qfxtextedit.cpp | 10 ++++----- src/declarative/fx/qfxtextinput.cpp | 2 +- src/declarative/qml/qmlcompiler.cpp | 2 +- 7 files changed, 22 insertions(+), 22 deletions(-) diff --git a/doc/src/snippets/declarative/comments.qml b/doc/src/snippets/declarative/comments.qml index 4f8a442..806be29 100644 --- a/doc/src/snippets/declarative/comments.qml +++ b/doc/src/snippets/declarative/comments.qml @@ -7,5 +7,5 @@ Text { we give it a large size and different font. */ font.family: "Helvetica" - font.size: 24 + font.pointSize: 24 } diff --git a/doc/src/snippets/declarative/pathview/pathattributes.qml b/doc/src/snippets/declarative/pathview/pathattributes.qml index 3c2b204..92d6966 100644 --- a/doc/src/snippets/declarative/pathview/pathattributes.qml +++ b/doc/src/snippets/declarative/pathview/pathattributes.qml @@ -13,7 +13,7 @@ Rectangle { opacity: PathView.opacity VerticalLayout { Image { anchors.horizontalCenter: Name.horizontalCenter; width: 64; height: 64; source: icon } - Text { id: Name; text: name; font.size: 16} + Text { id: Name; text: name; font.pointSize: 16} } } } diff --git a/doc/src/snippets/declarative/pathview/pathview.qml b/doc/src/snippets/declarative/pathview/pathview.qml index f5db242..004a1d2 100644 --- a/doc/src/snippets/declarative/pathview/pathview.qml +++ b/doc/src/snippets/declarative/pathview/pathview.qml @@ -11,7 +11,7 @@ Rectangle { width: 80; height: 80 VerticalLayout { Image { anchors.horizontalCenter: Name.horizontalCenter; width: 64; height: 64; source: icon } - Text { id: Name; text: name; font.size: 16} + Text { id: Name; text: name; font.pointSize: 16} } } } diff --git a/src/declarative/fx/qfxtext.cpp b/src/declarative/fx/qfxtext.cpp index dcaaa54..e310200 100644 --- a/src/declarative/fx/qfxtext.cpp +++ b/src/declarative/fx/qfxtext.cpp @@ -62,7 +62,7 @@ QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Text,QFxText) It can display both plain and rich text. For example: \qml - Text { text: "Hello World!"; font.family: "Helvetica"; font.size: 24; color: "red" } + Text { text: "Hello World!"; font.family: "Helvetica"; font.pointSize: 24; color: "red" } Text { text: "Hello World!" } \endqml @@ -90,7 +90,7 @@ QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Text,QFxText) It can display both plain and rich text. For example: \qml - Text { text: "Hello World!"; font.family: "Helvetica"; font.size: 24; color: "red" } + Text { text: "Hello World!"; font.family: "Helvetica"; font.pointSize: 24; color: "red" } Text { text: "Hello World!" } \endqml @@ -126,11 +126,11 @@ QFxText::~QFxText() \qmlproperty string Text::font.family \qmlproperty bool Text::font.bold \qmlproperty bool Text::font.italic - \qmlproperty real Text::font.size + \qmlproperty bool Text::font.underline + \qmlproperty real Text::font.pointSize + \qmlproperty real Text::font.pixelSize Set the Text's font attributes. - - \note \c font.size sets the font's point size (not pixel size). */ QFont QFxText::font() const { @@ -230,10 +230,10 @@ QColor QFxText::color() const \qml HorizontalPositioner { - Text { font.size: 24; text: "Normal" } - Text { font.size: 24; text: "Raised"; style: "Raised"; styleColor: "#AAAAAA" } - Text { font.size: 24; text: "Outline"; style: "Outline"; styleColor: "red" } - Text { font.size: 24; text: "Sunken"; style: "Sunken"; styleColor: "#AAAAAA" } + Text { font.pointSize: 24; text: "Normal" } + Text { font.pointSize: 24; text: "Raised"; style: "Raised"; styleColor: "#AAAAAA" } + Text { font.pointSize: 24; text: "Outline"; style: "Outline"; styleColor: "red" } + Text { font.pointSize: 24; text: "Sunken"; style: "Sunken"; styleColor: "#AAAAAA" } } \endqml @@ -365,16 +365,16 @@ void QFxText::setWrap(bool w) \qml VerticalPositioner { TextEdit { - font.size: 24 + font.pointSize: 24 text: "Hello World!" } TextEdit { - font.size: 24 + font.pointSize: 24 textFormat: "RichText" text: "Hello World!" } TextEdit { - font.size: 24 + font.pointSize: 24 textFormat: "PlainText" text: "Hello World!" } diff --git a/src/declarative/fx/qfxtextedit.cpp b/src/declarative/fx/qfxtextedit.cpp index f7f5f0a..3cab15d 100644 --- a/src/declarative/fx/qfxtextedit.cpp +++ b/src/declarative/fx/qfxtextedit.cpp @@ -67,7 +67,7 @@ TextEdit { text: "Hello World!" focus: true font.family: "Helvetica" - font.size: 20 + font.pointSize: 20 color: "blue" width: 240 } @@ -126,7 +126,7 @@ QString QFxTextEdit::text() const /*! \qmlproperty font TextEdit::font - Set the TextEdit's font attributes. \c font.size sets the font's point size. + Set the TextEdit's font attributes. */ /*! @@ -169,16 +169,16 @@ void QFxTextEdit::setText(const QString &text) \qml VerticalPositioner { TextEdit { - font.size: 24 + font.pointSize: 24 text: "Hello World!" } TextEdit { - font.size: 24 + font.pointSize: 24 textFormat: "RichText" text: "Hello World!" } TextEdit { - font.size: 24 + font.pointSize: 24 textFormat: "PlainText" text: "Hello World!" } diff --git a/src/declarative/fx/qfxtextinput.cpp b/src/declarative/fx/qfxtextinput.cpp index 164739f..252d5c8 100644 --- a/src/declarative/fx/qfxtextinput.cpp +++ b/src/declarative/fx/qfxtextinput.cpp @@ -101,7 +101,7 @@ void QFxTextInput::setText(const QString &s) /*! \qmlproperty font TextInput::font - Set the TextInput's font attributes. \c font.size sets the font's point size. + Set the TextInput's font attributes. */ QFont QFxTextInput::font() const { diff --git a/src/declarative/qml/qmlcompiler.cpp b/src/declarative/qml/qmlcompiler.cpp index e04c876..afc8698 100644 --- a/src/declarative/qml/qmlcompiler.cpp +++ b/src/declarative/qml/qmlcompiler.cpp @@ -1449,7 +1449,7 @@ bool QmlCompiler::buildAttachedProperty(QmlParser::Property *prop, // Build "grouped" properties. In this example: // Text { -// font.size: 12 +// font.pointSize: 12 // font.family: "Helvetica" // } // font is a nested property. size and family are not. -- cgit v0.12