Index: sources/gui/qml/pages/TreatmentFlowBase.qml =================================================================== diff -u -r3ef1a4ff361ba1774ad1a6f6170dbb174cadbdd5 -r41ba9331e6a540df0c8eced0c4d3b8684afa9afa --- sources/gui/qml/pages/TreatmentFlowBase.qml (.../TreatmentFlowBase.qml) (revision 3ef1a4ff361ba1774ad1a6f6170dbb174cadbdd5) +++ sources/gui/qml/pages/TreatmentFlowBase.qml (.../TreatmentFlowBase.qml) (revision 41ba9331e6a540df0c8eced0c4d3b8684afa9afa) @@ -36,10 +36,9 @@ property bool instructionBased : false readonly property alias instruction : _instructionLoader.item - property string instructionlocation : "" + property string instructionTitle : "" property var instructionStepNames : [] property var instructionStepImages : [] - readonly property bool instructionIsLast: instruction ? instruction.lastStep : true property bool hasTimeCircle : false readonly property alias timeCircle : _timeCircleLoader.item @@ -56,12 +55,12 @@ property bool checkListTimeVisible : false property int checkListTimeSeconds : 0 - property string completeText : "" property bool isComplete : false readonly property int titleTopMargin: 110 + readonly property int sideMargins : Variables.defaultMargin * 2 + Variables.headerButtonsMargin // matching header button margins signal backClicked() signal confirmClicked() @@ -70,7 +69,7 @@ if (checkList) checkList.resetItems() if (instruction) - instruction.currentStepIndex = 0 + instruction.currentIndex = 0 _notification.text = "" if (visible) { _mainMenu.hidden = true @@ -80,10 +79,15 @@ // vvvvvvvvvvvvvvvvvvvvvvvvv HEADER vvvvvvvvvvvvvvvvvvvvvvvvv // StepNavigationTitleBar { id: _titleBar stepIndex : stackStepIndex // shall have a definition in the parent stack - anchors.top : _root.top - anchors.horizontalCenter : parent.horizontalCenter + anchors { + top : _root.top + left : parent.left + right : parent.right + leftMargin : Variables.defaultMargin * 2 + rightMargin : anchors.leftMargin + } + width : _root.width - confirmEnabled : instruction ? instruction.lastStep : true stepNames : [ ] onBackClicked : _root.backClicked() onConfirmClicked: _root.confirmClicked() @@ -96,39 +100,34 @@ topMargin : titleTopMargin horizontalCenter: parent.horizontalCenter } - text : qsTr("TreatmentFlowBase") color : Colors.textMain font.pixelSize : Fonts.fontPixelTitle } - // ^^^^^^^^^^^^^^^^^^^^^^^^^ HEADER ^^^^^^^^^^^^^^^^^^^^^^^^^ // // vvvvvvvvvvvvvvvvvvvv Optional Components vvvvvvvvvvvvvvvvvvvv // Loader { id: _instructionLoader - readonly property int outerHMargin : 30 readonly property int outerVMargin : 15 active : _root.instructionBased anchors { top : title.visible ? title.bottom : title.top bottom : footer.top left : parent.left right : parent.right - leftMargin : outerHMargin - rightMargin : outerHMargin + leftMargin : _root.sideMargins + rightMargin : _root.sideMargins topMargin : outerVMargin bottomMargin : outerVMargin } sourceComponent : InstructionView { id: _instructionView - label : title.visible ? "" : _root.title.text - location : _root.instructionlocation + title : _root.instructionTitle stepNames : _root.instructionStepNames stepImages : _root.instructionStepImages } } Loader { id : _timeCircleLoader active : _root.hasTimeCircle - anchors.top : _root.hasCheckList ? title.bottom : undefined anchors.topMargin : _root.hasCheckList ? 25 : 0 anchors.horizontalCenter: _root.horizontalCenter @@ -187,12 +186,11 @@ if ( instructionsGroup !== undefined ) { // DEBUG : // console.debug(" 00000 ", group, settingsGroup, settingsCategory.groups) - _root.instructionlocation = instructionsGroup.location + _root.instructionTitle = instructionsGroup.title _root.instructionStepNames = instructionsGroup.keys _root.instructionStepImages = instructionsGroup.values } } } } - }