Commit 666fd0d6 authored by Ulf Hermann's avatar Ulf Hermann
Browse files

Timeline: Provide some sane defaults for all text elements



Change-Id: I40e4a777c6f485443ab142cc220ae22dab44b752
Reviewed-by: default avatarJoerg Bornemann <joerg.bornemann@theqtcompany.com>
parent a3246946
......@@ -83,16 +83,14 @@ Item {
anchors.fill: parent
}
Text {
TimelineText {
id: txt
x: 5
font.pixelSize: 12
text: labelContainer.text
color: "#232323"
height: model ? model.defaultRowHeight : 0
width: 140
verticalAlignment: Text.AlignVCenter
renderType: Text.NativeRendering
elide: Text.ElideRight
}
......@@ -221,16 +219,14 @@ Item {
}
]
Text {
TimelineText {
id: draggerText
visible: parent.Drag.active
x: txt.x
font.pixelSize: txt.font.pixelSize
color: "white"
width: txt.width
height: txt.height
verticalAlignment: txt.verticalAlignment
renderType: txt.renderType
}
}
......
......@@ -30,13 +30,10 @@
import QtQuick 2.1
Text {
TimelineText {
property bool isLabel: false
property int valueWidth: 170
font.pixelSize: 12
font.bold: isLabel
textFormat: Text.PlainText
renderType: Text.NativeRendering
elide: Text.ElideRight
width: text === "" ? 0 : (isLabel ? implicitWidth : valueWidth)
}
......@@ -172,7 +172,7 @@ Item {
}
//title
Text {
TimelineText {
id: typeTitle
text: " "+rangeDetails.dialogTitle
font.bold: true
......@@ -182,7 +182,6 @@ Item {
anchors.left: parent.left
anchors.right: editIcon.left
color: "white"
renderType: Text.NativeRendering
elide: Text.ElideRight
}
......@@ -238,7 +237,9 @@ Item {
wrapMode: Text.Wrap
color: "orange"
font.italic: true
renderType: Text.NativeRendering
font.pixelSize: typeTitle.font.pixelSize
font.family: typeTitle.font.family
renderType: typeTitle.renderType
selectByMouse: true
onTextChanged: saveTimer.restart()
onFocusChanged: {
......@@ -300,13 +301,12 @@ Item {
}
Text {
TimelineText {
id: closeIcon
x: col.width + 10
y: 4
text:"X"
color: "white"
renderType: Text.NativeRendering
MouseArea {
anchors.fill: parent
onClicked: rangeDetails.clearSelection()
......
......@@ -53,13 +53,11 @@ Button {
border.color: "#c8c8c8"
color: "#eaeaea"
}
label: Text {
label: TimelineText {
text: button.labelText
textFormat: Text.PlainText
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignLeft
elide: Text.ElideRight
renderType: Text.NativeRendering
}
}
MouseArea {
......
......@@ -117,7 +117,7 @@ Item {
}
//title
Text {
TimelineText {
id: typeTitle
text: " "+qsTr("Selection")
font.bold: true
......@@ -126,7 +126,6 @@ Item {
verticalAlignment: Text.AlignVCenter
width: parent.width
color: "white"
renderType: Text.NativeRendering
}
// Details area
......@@ -174,13 +173,12 @@ Item {
onClicked: selectionRangeDetails.recenter()
}
Text {
TimelineText {
id: closeIcon
x: selectionRangeDetails.width - 14
y: 4
text:"X"
color: "white"
renderType: Text.NativeRendering
MouseArea {
anchors.fill: parent
anchors.leftMargin: -8
......
......@@ -124,11 +124,9 @@ Item {
color: (Math.round(column.block + timeDisplay.alignedWindowStart /
timeDisplay.timePerBlock) % 2) ? color1 : color2;
Text {
TimelineText {
id: labelText
renderType: Text.NativeRendering
font.pixelSize: timeDisplay.fontSize
font.family: "sans-serif"
anchors.fill: parent
anchors.leftMargin: timeDisplay.textMargin
anchors.bottomMargin: timeDisplay.textMargin
......
......@@ -99,9 +99,8 @@ Item {
return ret;
}
Text {
TimelineText {
id: scaleTopLabel
renderType: Text.NativeRendering
visible: parent.scaleVisible
color: "#B0B0B0"
font.pixelSize: 8
......
import QtQuick 2.0
Text {
font.pixelSize: 12
font.family: "sans-serif"
textFormat: Text.PlainText
renderType: Text.NativeRendering
}
......@@ -33,5 +33,6 @@
<file>TimelineContent.qml</file>
<file>RowLabel.qml</file>
<file>SynchronousReloader.qml</file>
<file>TimelineText.qml</file>
</qresource>
</RCC>
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