Index: sources/gui/qml/dialogs/NotificationDialog.qml =================================================================== diff -u -rd0c1c6aa5856a7acbca29a4c5435cc20db3ea383 -r2ef03b2ce51b4dc507f66e9671953a8e0824bde9 --- sources/gui/qml/dialogs/NotificationDialog.qml (.../NotificationDialog.qml) (revision d0c1c6aa5856a7acbca29a4c5435cc20db3ea383) +++ sources/gui/qml/dialogs/NotificationDialog.qml (.../NotificationDialog.qml) (revision 2ef03b2ce51b4dc507f66e9671953a8e0824bde9) @@ -1,13 +1,13 @@ /*! * - * Copyright (c) 2020-2022 Diality Inc. - All Rights Reserved. + * Copyright (c) 2020-2024 Diality Inc. - All Rights Reserved. * \copyright * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. * * \file NotificationDialog.qml * \author (last) Behrouz NematiPour - * \date (last) 07-Oct-2021 + * \date (last) 17-Apr-2023 * \author (original) Peter Lucia * \date (original) 02-Jun-2020 * @@ -28,7 +28,9 @@ contentItem.objectName: "_NotificationDialog" // SquishQt property alias titleText : _title.text + property alias titlePixelSize : _title.font.pixelSize property alias description : _desc.text + property alias descriptionPixelSize : _desc.font.pixelSize property alias titleBarForeground : _title.color property alias titleBarBackground : _titleBar.color property alias isSilenced : _muteButton.isSilenced @@ -74,26 +76,33 @@ radius : _root.radius clip : true // the mute button expands so we need to clip the outside unwanted area. - Image { id: _icon - source: "qrc:/images/iAlarm" - anchors.horizontalCenter: _title.horizontalCenter - anchors.verticalCenter: _title.verticalCenter - anchors.horizontalCenterOffset: -_title.width + Variables.dialogIconHorizontalOffset; - height : Variables.alarmListIconDiameter - width : Variables.alarmListIconDiameter - } + // Image { id: _icon + // source: "qrc:/images/iAlarm" + // anchors.horizontalCenter: _title.horizontalCenter + // anchors.verticalCenter: _title.verticalCenter + // anchors.horizontalCenterOffset: -_title.width + Variables.dialogIconHorizontalOffset; + // height : Variables.alarmListIconDiameter + // width : Variables.alarmListIconDiameter + // } Text { id: _title color: Colors.textMain font.pixelSize: Fonts.fontPixelTitle text: qsTr("Notification") - anchors.centerIn: _titleBar; + + width: _titleBar.width + verticalAlignment : Text.AlignVCenter + horizontalAlignment : Text.AlignHCenter + anchors.centerIn: _titleBar } MouseArea { id: _minimizeArea - enabled : _root.minVisible - anchors.fill: parent - onClicked : _root.minimizeClicked() + // this object is not exposed so cannot be missused by the child component, so here it can be enabled and being handled by the minVisible property + // enabled : _root.minVisible + anchors.fill : parent + onClicked : { if ( _root.minVisible ) _root.minimizeClicked() } // if can be minimized (minVisible = true ), call the minimizeClinked signal (norma behavior) + onDoubleClicked : { if ( ! _root.minVisible ) _sdcProgressItem.doubleClicked() } // if can NOT be minimized (minVisible = false), call the sdcard.double click to pop the DiagnosticsDialog + // TODO: disable doubleClicked later. this is only for diagnostic purpose when alarm dialog covers the entire screen. } UpDownButton { id: _minimizeButton @@ -125,30 +134,24 @@ height: _titleBar.height anchors { verticalCenter : _titleBar.verticalCenter - right : _titleBar.right - rightMargin : _minimizeButton.width * 2 + right : _minimizeButton.left + rightMargin : 15 } textPixelSize : 30 textWeight : Font.Normal secondsVisible : false hourZero : false minuteZero : true } - - // TODO: disable this later. this is only for diagnostic purpose when alarm dialog covers the entire screen. - MouseArea { - anchors.fill: _icon - onClicked : if ( _minimizeArea.enabled ) _root.minimizeClicked() - onDoubleClicked : _sdItem.doubleClicked() - } } Rectangle { id: _descReect color: Colors.transparent + clip : true anchors { fill : parent - topMargin : 5 + _titleBar .height - bottomMargin : 5 + _buttonGroup .height + _buttonGroup.spacing + topMargin : _titleBar .height + 2 + bottomMargin : _buttonGroup .height } Text { id: _desc @@ -216,4 +219,16 @@ selectColor : Qt.darker(_root.backgroundColor, 1.15) } } + + Text { id: _alarmID + text : qsTr("ID") + ":" + _root.alarmID + anchors { + left : parent.left + bottom : parent.bottom + leftMargin : 5 + bottomMargin: 5 + } + color : Colors.textMain + font.pixelSize : Fonts.fontPixelDialogText + } }