Index: sources/gui/qml/dialogs/NotificationDialog.qml =================================================================== diff -u -r5d784780bbec88cd8531bb56fbcc6e6fe2703236 -rf7d7e8b10c7626f3c6b8450876721a452ebd730f --- sources/gui/qml/dialogs/NotificationDialog.qml (.../NotificationDialog.qml) (revision 5d784780bbec88cd8531bb56fbcc6e6fe2703236) +++ sources/gui/qml/dialogs/NotificationDialog.qml (.../NotificationDialog.qml) (revision f7d7e8b10c7626f3c6b8450876721a452ebd730f) @@ -31,8 +31,8 @@ property alias titleText : _title.text property alias titlePixelSize : _title.font.pixelSize property string description : "" - property var instructions : [] - property var images : [] + property alias instructionModel : _listView.model +// property var images : [] property alias titleBarForeground : _title.color property alias titleBarBackground : _titleBar.color property alias isSilenced : _headerButtonGroup.isSilenced @@ -60,23 +60,21 @@ // this behaviour does not look nice on the screen and it bounces visible : description && ! isSilenced radius : Variables.alarmDialogRadius - width : Variables.alarmDialogWidth - height : Variables.alarmDialogHeight - onInstructionsChanged: { - _model.clear() +// onInstructionsChanged: { +// _model.clear() - for (var step in instructions) { - _model.append({ text: instructions[step], image: "file:" + images[step] }) - } +// for (var step in instructions) { +// _model.append({ text: instructions[step], image: "file:" + images[step] }) +// } - if ( _model.count > 0) { - _listView.currentIndex = 0 - figureImageSource = _model.get(_listView.currentIndex).image - } - } +// if ( _model.count > 0) { +// _listView.currentIndex = 0 +// figureImageSource = _model.get(_listView.currentIndex).image +// } +// } - ListModel { id: _model } +// ListModel { id: _model } signal muteClicked() signal minimizeClicked() @@ -93,13 +91,6 @@ radius : _root.radius clip : true // the mute button expands so we need to clip the outside unwanted area. - gradient: Gradient { - orientation: Gradient.Horizontal - GradientStop { position: 0.0; color: Qt.darker (_titleBar.color, 1.1) } - GradientStop { position: 0.5; color: Qt.lighter (_titleBar.color, 1.1) } - GradientStop { position: 0.9; color: Qt.darker (_titleBar.color, 1.1) } - } - // TODO: disable doubleClicked later. this is only for diagnostic purpose when alarm dialog covers the entire screen. MouseArea { id: _minimizeArea anchors.fill : parent @@ -187,7 +178,7 @@ width : _descriptionRect.width ListView {id: _listView - model : _model +// model : _model height : _alarmContentRow.height width : parent.width * 0.65 currentIndex: 0 @@ -237,7 +228,7 @@ font.pixelSize : 23 font.weight : _delegateControl.ListView.isCurrentItem ? Font.DemiBold : Font.Normal color : _delegateControl.ListView.isCurrentItem ? "#18559E" : Colors.alarmDialogText - text : model.text + text : model.instruction wrapMode : Text.WordWrap } @@ -423,6 +414,6 @@ bottomMargin: Variables.defaultMargin * 4 } color : Colors.alarmDialogGreyText - font.pixelSize : Fonts.fontPixelAlarmTID + font.pixelSize : Fonts.fontPixelAlarmID } }