Improve property naming

This commit is contained in:
David Rowe 2016-02-26 10:17:36 +13:00
parent 5d931523ad
commit d255ad3805
4 changed files with 10 additions and 10 deletions

View file

@ -14,7 +14,7 @@ import "../styles-uit"
Column {
property string name: "Static Section"
property bool hasSeparator: false
property bool isFirst: false
spacing: hifi.dimensions.contentSpacing.y
@ -28,7 +28,7 @@ Column {
VerticalSpacer { }
Item {
visible: hasSeparator
visible: !isFirst
anchors.top: sectionName.top
Rectangle {
@ -57,7 +57,7 @@ Column {
color: hifi.colors.lightGrayText
verticalAlignment: Text.AlignBottom
height: {
if (hasSeparator) {
if (!isFirst) {
hifi.dimensions.contentMargin.y
}
}

View file

@ -85,8 +85,8 @@ Window {
sections[i].expanded = true;
}
}
sections[0].hasSeparator = false;
sections[sections.length - 1].hasSpacer = true;
sections[0].isFirst = true;
sections[sections.length - 1].isLast = true;
}
}

View file

@ -20,8 +20,8 @@ Preference {
id: root
property bool collapsable: true
property bool expanded: false
property bool hasSeparator: true
property bool hasSpacer: false
property bool isFirst: false
property bool isLast: false
property string name: "Header"
property real spacing: 8
default property alias preferences: contentContainer.children
@ -44,7 +44,7 @@ Preference {
children: [ contentContainer ]
height: contentContainer.height + (root.hasSpacer ? 2 * hifi.dimensions.contentSpacing.y : 0)
height: contentContainer.height + (root.isLast ? 2 * hifi.dimensions.contentSpacing.y : 0)
Component.onCompleted: d.buildPreferences();
@ -52,7 +52,7 @@ Preference {
id: contentContainer
name: root.name
hasSeparator: root.hasSeparator
isFirst: root.isFirst
anchors {
left: parent.left

View file

@ -89,6 +89,7 @@ Window {
HifiControls.StaticSection {
name: "Currently Running"
isFirst: true
Row {
spacing: hifi.dimensions.contentSpacing.x
@ -117,7 +118,6 @@ Window {
HifiControls.StaticSection {
name: "Load Scripts"
hasSeparator: true
Row {
spacing: hifi.dimensions.contentSpacing.x