Index: sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentBase.qml =================================================================== diff -u -rf8e37a0cbb537edceebee7a7c5f2676f497d1e26 -r6084f7bd48dc98616b4a5e0d076c2d03330001db --- sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentBase.qml (.../TreatmentAdjustmentBase.qml) (revision f8e37a0cbb537edceebee7a7c5f2676f497d1e26) +++ sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentBase.qml (.../TreatmentAdjustmentBase.qml) (revision 6084f7bd48dc98616b4a5e0d076c2d03330001db) @@ -32,46 +32,68 @@ property string titleText: "" property bool closeVisible: true - property bool confirmVisible: true + property bool confirmVisible: false property bool backVisible: false property alias information: _information signal closeClicked() signal confirmClicked() signal backClicked() - y: Math.round((Variables.applicationHeight - height) / 2) - Variables.headerHeight + width : Variables.adjustmentDialogWidth + height : Variables.adjustmentDialogHeight + y : Math.round((Variables.applicationHeight - height) / 2) - Variables.headerHeight onVisibleChanged: { notificationText = "" } - header: - Rectangle { id : _headerRect + header: Item { id : _headerRect + implicitHeight: Variables.adjustmentHeaderHeight + // TODO: remove ConfirmButton later once it is moved out into screens that inherit this ConfirmButton { id : _confirmButton + anchors { + right : parent.right + verticalCenter : _backButton.verticalCenter + margins : Variables.adjustmentButtonMargin + } visible: _root.confirmVisible onClicked : confirmClicked() } + BackButton { id : _backButton + anchors { + top : parent.top + left : parent.left + margins : Variables.adjustmentButtonMargin + } visible: _root.backVisible onClicked : backClicked() } TitleText { id : _titleText text: titleText - font.pixelSize: Fonts.fontPixelButton - color: Colors.textMain - height: Variables.mainMenuHeight + font { + pixelSize : Fonts.fontPixelTitle + weight : Font.Medium + } + color : Colors.textMain + width : contentWidth + height : contentHeight anchors { - top: parent.top - horizontalCenter: parent.horizontalCenter - margins: 35 + bottom : parent.bottom + horizontalCenter : parent.horizontalCenter + margins : Variables.defaultMargin } } CloseButton { id : _closeButton + anchors { + right : parent.right + verticalCenter : _backButton.verticalCenter + margins : Variables.adjustmentButtonMargin + } visible: _root.closeVisible - anchors.left: parent.left onClicked : { closeClicked() close() @@ -83,8 +105,11 @@ // this meant to be used specifically as current state notification like paused/off in UF // it is also available in TreatmentAdjustmentFlow and TreatmentAdjustmentDuration but not used. NotificationBarSmall { id: _information - visible : false - imageSource : "" - text : "" + visible : false + imageSource : "" + imageDiameter : 26 + imageVerticalCenter : true + imageFillMode : Image.PreserveAspectFit + text : "" } }