+
+ Behavior on width {
+ PropertyAnimation { duration: 100 }
+ }
+
+ CameraToolIcon {
+ visible: !parent.hideBack
+ id: menu
+ anchors.verticalCenter: parent.verticalCenter
+ iconSource: cameraTheme.cameraToolBarMenuIcon
+ anchors.left: parent.left
+ anchors.top: parent.top
+ anchors.bottom: parent.bottom
+
+ onClicked: {
+ if (parent.manualBack) {
+ parent.clicked()
+ } else if (!parent.expanded) {
+ parent.expanded = true
+ } else if (Layout.stack.length == 1) {
+ expanded = false
+ } else {
+ __currentTools = Layout.pop()
+ }
+ }
+ }
+
+ Rectangle {
+ id: dock
+ property real menuWidth: parent.hideBack ? 0 : menu.width
+ property real leftMargin: (parent.width - __currentTools.childrenWidth - menuWidth) / __currentTools.childrenLen
+ color: "transparent"
+ anchors.top: parent.top
+ anchors.bottom: parent.bottom
+ anchors.right: parent.right
+ anchors.left: parent.hideBack ? parent.left : menu.right
+ anchors.leftMargin: parent.hideBack ? 0 : leftMargin
+ }
+
+ Component {
+ id: toolsContainer
+ Item {
+ property Item tools
+ property Item owner
+ }
+ }