Update section headers

This commit is contained in:
David Rowe 2016-03-03 19:17:48 +13:00
parent fb675dbaf5
commit f88eef7549

View file

@ -39,13 +39,22 @@ Column {
Item { Item {
id: sectionName id: sectionName
height: (isCollapsible ? 4 : 3) * hifi.dimensions.contentSpacing.y
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
height: leadingSpace.height + topBar.height + heading.height + bottomBar.height
Item { Item {
id: leadingSpace
width: 1
height: isFirst ? hifi.dimensions.contentSpacing.y : hifi.dimensions.controlInterlineHeight
anchors.top: parent.top
}
Item {
id: topBar
visible: !isFirst visible: !isFirst
anchors.top: heading.top height: visible ? 2 : 0
anchors.top: leadingSpace.bottom
Rectangle { Rectangle {
id: shadow id: shadow
@ -69,15 +78,17 @@ Column {
anchors { anchors {
left: parent.left left: parent.left
right: parent.right right: parent.right
top: parent.top top: topBar.bottom
topMargin: hifi.dimensions.contentSpacing.y
} }
height: 3 * hifi.dimensions.contentSpacing.y height: (isCollapsible ? 3 : 2) * hifi.dimensions.contentSpacing.y
RalewayRegular { RalewayRegular {
id: title id: title
anchors.left: parent.left anchors {
anchors.verticalCenter: parent.verticalCenter left: parent.left
top: parent.top
topMargin: hifi.dimensions.contentSpacing.y
}
size: hifi.fontSizes.sectionName size: hifi.fontSizes.sectionName
font.capitalization: Font.AllUppercase font.capitalization: Font.AllUppercase
text: name text: name
@ -104,9 +115,10 @@ Column {
} }
LinearGradient { LinearGradient {
id: bottomBar
visible: isCollapsible visible: isCollapsible
width: frame.width width: frame.width
height: 4 height: visible ? 4 : 0
x: -hifi.dimensions.contentMargin.x x: -hifi.dimensions.contentMargin.x
anchors.top: heading.bottom anchors.top: heading.bottom
start: Qt.point(0, 0) start: Qt.point(0, 0)