Commit 0c0dbcc5 authored by Christiaan Janssen's avatar Christiaan Janssen

QmlProfiler: minor improvements in rangedetails display

Change-Id: I7a4c85443d99425f5b15eda424745b83526ebb3f
Reviewed-on: http://codereview.qt.nokia.com/754Reviewed-by: default avatarQt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: default avatarKai Koehne <kai.koehne@nokia.com>
parent 9baa4f51
......@@ -51,17 +51,23 @@ Item {
}
Text {
id: lbl
text: label + ":"
text: label
font.pixelSize: 12
font.bold: true
anchors.right: guideline.left
}
Text {
text:":"
font.pixelSize: 12
font.bold: true
anchors.right: baseline.left
anchors.baseline: lbl.baseline
}
Text {
text: content
font.pixelSize: 12
anchors.baseline: lbl.baseline
anchors.left: guideline.right
// maximumLineCount: maxLines
maximumLineCount: maxLines
onLinkActivated: detail.linkActivated(link)
}
}
......@@ -73,12 +73,26 @@ BorderImage {
label: "Duration"
content: rangeDetails.duration < 1000 ?
rangeDetails.duration + "μs" :
Math.floor(rangeDetails.duration/1000) + "ms"
Math.floor(rangeDetails.duration/10)/100 + "ms"
}
Detail {
opacity: content.length !== 0 ? 1 : 0
label: "Details"
content: rangeDetails.label
content: {
var inputString = rangeDetails.label;
if (inputString.length > 7 && inputString.substring(0,7) == "file://") {
var pos = inputString.lastIndexOf("/");
return inputString.substr(pos+1);
}
// transform code blocks into oneliners
inputString = inputString.replace("\n", " ");
var maxLen = 40;
if (inputString.length > maxLen)
inputString = inputString.substring(0,maxLen)+"...";
return inputString;
}
}
Detail {
opacity: content.length !== 0 ? 1 : 0
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment