aboutsummaryrefslogtreecommitdiffstats
path: root/examples/declarative/twitter/TwitterCore/FatDelegate.qml
diff options
context:
space:
mode:
authorAndrew den Exter <andrew.den-exter@nokia.com>2012-02-09 16:14:40 +1000
committerQt by Nokia <qt-info@nokia.com>2012-02-09 09:10:31 +0100
commit8550ed69156f0472450fd11aabcaa5d4dcc676db (patch)
tree91b1d6848e1ce5199db4040decb4a3cd79352788 /examples/declarative/twitter/TwitterCore/FatDelegate.qml
parenta4b4932efb631a3c467c9bb4b3e4f99ca70a066d (diff)
Add linkColor property to Text.
Allows the color of links in text to be changed from the default blue. This currently only works with StyledText and the distance field rendererer. It could be made to work with RichText overwriting the specified foreground color in all instances or by not setting a default color in the html parser. The former would prevent the color being set with CSS or some future means for altering text formats. The latter would break rendering with QPainter. Task-number: QTBUG-23048 Change-Id: I98df215cabe8a089f648fd4a6206622b4318fb8f Reviewed-by: Martin Jones <martin.jones@nokia.com>
Diffstat (limited to 'examples/declarative/twitter/TwitterCore/FatDelegate.qml')
-rw-r--r--examples/declarative/twitter/TwitterCore/FatDelegate.qml6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/declarative/twitter/TwitterCore/FatDelegate.qml b/examples/declarative/twitter/TwitterCore/FatDelegate.qml
index d23079a26e..5fd0d1622b 100644
--- a/examples/declarative/twitter/TwitterCore/FatDelegate.qml
+++ b/examples/declarative/twitter/TwitterCore/FatDelegate.qml
@@ -92,11 +92,11 @@ Component {
}
Text { id:txt; y:4; x: 56
- text: '<html><style type="text/css">a:link {color:"#aaccaa"}; a:visited {color:"#336633"}</style>'
+ text: '<html>'
+ '<a href="app://@'+userName(name)+'"><b>'+userName(name) + "</b></a> from " +source
+ "<br /><b>" + statusText + "</b></html>";
- textFormat: Qt.RichText
- color: "#cccccc"; style: Text.Raised; styleColor: "black"; wrapMode: Text.WordWrap
+ textFormat: Text.StyledText
+ color: "#cccccc"; style: Text.Raised; styleColor: "black"; wrapMode: Text.WordWrap; linkColor: "#aaccaa"
anchors.left: image.right; anchors.right: blackRect.right; anchors.leftMargin: 6; anchors.rightMargin: 6
onLinkActivated: wrapper.handleLink(link)
}