mirror of
https://github.com/overte-org/overte.git
synced 2025-04-11 04:34:48 +02:00
FInding a path
This commit is contained in:
parent
f6001c178d
commit
4ce7d75720
2 changed files with 42 additions and 15 deletions
scripts/developer/utilities/lib
|
@ -30,6 +30,36 @@ Prop.PropGroup {
|
|||
|
||||
property var showProps: true
|
||||
property var showSubs: true
|
||||
property var jobEnabled: true
|
||||
|
||||
// Panel Header Data Component
|
||||
panelHeaderData: Component {
|
||||
Item {
|
||||
id: header
|
||||
Prop.PropLabel {
|
||||
text: root.label
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
anchors.left: parent.left
|
||||
anchors.right: enabledIcon.left
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
Prop.PropCanvasIcon {
|
||||
id: enabledIcon
|
||||
anchors.right: parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
fillColor: global.colorOrangeAccent
|
||||
filled: jobEnabled
|
||||
|
||||
MouseArea{
|
||||
id: mousearea
|
||||
anchors.fill: parent
|
||||
onClicked: {
|
||||
root.jobEnabled = !root.jobEnabled
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function populatePropItems() {
|
||||
var propsModel = []
|
||||
|
|
|
@ -20,7 +20,16 @@ Item {
|
|||
property var indentDepth: 0
|
||||
|
||||
property alias propItemsPanel: propItemsContainer
|
||||
default property alias extHeader: headerContainer.data
|
||||
|
||||
// Panel Header Data Component
|
||||
property Component panelHeaderData: defaultPanelHeaderData
|
||||
Component { // default is a Label
|
||||
id: defaultPanelHeaderData
|
||||
PropLabel {
|
||||
text: root.label
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
}
|
||||
}
|
||||
|
||||
// Header Item
|
||||
Rectangle {
|
||||
|
@ -67,22 +76,12 @@ Item {
|
|||
|
||||
// Next the header container
|
||||
// by default containing a Label showing the root.label
|
||||
Item {
|
||||
id: headerContainer
|
||||
Loader {
|
||||
sourceComponent: panelHeaderData
|
||||
anchors.left: headerFolder.right
|
||||
anchors.right: header.right
|
||||
anchors.verticalCenter: header.verticalCenter
|
||||
height: parent.height
|
||||
|
||||
PropLabel {
|
||||
id: labelControl
|
||||
anchors.left: headerContainer.left
|
||||
anchors.right: headerContainer.right
|
||||
anchors.verticalCenter: headerContainer.verticalCenter
|
||||
text: root.label
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -115,8 +114,6 @@ Item {
|
|||
}
|
||||
|
||||
height: header.height + isUnfold * propItemsContainer.height
|
||||
// anchors.leftMargin: global.horizontalMargin
|
||||
// anchors.rightMargin: global.horizontalMargin
|
||||
anchors.margins: 0
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
|
Loading…
Reference in a new issue