Index: sources/gui/qml/SDCProgressItem.qml =================================================================== diff -u -rccea9f498ece7b6f75e97d85c9312e67b736f98a -r97b77e88de3f6c41504ec5f9f3606a2143d27ff8 --- sources/gui/qml/SDCProgressItem.qml (.../SDCProgressItem.qml) (revision ccea9f498ece7b6f75e97d85c9312e67b736f98a) +++ sources/gui/qml/SDCProgressItem.qml (.../SDCProgressItem.qml) (revision 97b77e88de3f6c41504ec5f9f3606a2143d27ff8) @@ -28,66 +28,39 @@ * The ProgressCircle turns red if the amount of free space left is less than defined (15% for now) * The percent value in the circle will show "SD" if the device is not present/ready. */ -Rectangle { id: _root // TEST : SD-Card not present may need to be handled with better indication(s). - - signal clicked - signal doubleClicked - - readonly property int sizePowers : 1000000 - - readonly property alias totalText : _totalText.text +Rectangle { id: _root readonly property alias total : _progressCircle.maximum readonly property alias avail : _progressCircle.value - readonly property alias percent : _percent.text - property alias percentFontSize : _percent.font.pixelSize - property alias totalFontSize : _totalText.font.pixelSize - property alias thickness : _progressCircle.thickness - property alias circleShadowColor : _progressCircle.circleShadowColor - property color textColor : Colors.white + readonly property int percent : 100 - _GuiView.sdPercent property bool displayInformation : true color : Colors.transparent - anchors { - top : parent.top - right : parent.right - topMargin : 5 - rightMargin : 5 - } - width : 30 - height: width - radius: width + width : 30 + height : width + radius : width + Text { id: _percent - visible : displayInformation - anchors.centerIn: parent - color: ! _GuiView.sdIsReady ? Colors.red : _GuiView.sdIsReadOnly ? "gray" : _root.textColor - text : ! _GuiView.sdIsReady ? qsTr("SD") : _GuiView.sdPercent - font.pixelSize: 12 - font.bold: true + visible : displayInformation + anchors.centerIn : parent + text : ! _GuiView.sdIsReady ? qsTr("SD") : + ("%1%\n%2") .arg(_root.percent) + .arg(qsTr("Used")) + color : Colors.offWhite + font.pixelSize : Fonts.fontPixelContainerUnitSmall + horizontalAlignment : Text.AlignHCenter + font.weight : Font.Medium } + ProgressCircle { id: _progressCircle - anchors.fill: parent - diameter: _root.width - minimum : 0 - maximum : _GuiView.sdTotal / sizePowers // convert to MB since the value in byte is too big for ProgressCircle. - value : _GuiView.sdAvail / sizePowers // convert to MB since the value in byte is too big for ProgressCircle. - color : ! _GuiView.sdIsReady ? "red" : _GuiView.sdIsReadOnly ? "gray" : _GuiView.sdIsLow ? Colors.red : "green" - circleShadowColor: Colors.panelBorderColor - } - Text { id: _totalText - visible : _GuiView.sdIsReady && displayInformation - anchors.top: parent.bottom - anchors.horizontalCenter: parent.horizontalCenter - color : _root.textColor - text : Variables.sizeConverted( _GuiView.sdTotal, _root.sizePowers ) - font.pixelSize: 12 - font.bold: true - } + anchors.fill : parent + diameter : _root.width + minimum : 0 + maximum : 100 + value : _root.percent + color : ! _GuiView.sdIsReady ? "red" : _GuiView.sdIsReadOnly ? "gray" : _GuiView.sdIsLow ? Colors.red : Colors.borderButton + circleShadowColor : Colors.panelBorderColor + thickness : 5 - MouseArea { id: _mouseArea - anchors.fill : parent - anchors.margins : -20 // since the object visual is so small make the mouseArea bigger for the human finger to easier touch. - onClicked : _root.clicked() - onDoubleClicked : _root.doubleClicked() } } Index: sources/gui/qml/USBProgressItem.qml =================================================================== diff -u -rccea9f498ece7b6f75e97d85c9312e67b736f98a -r97b77e88de3f6c41504ec5f9f3606a2143d27ff8 --- sources/gui/qml/USBProgressItem.qml (.../USBProgressItem.qml) (revision ccea9f498ece7b6f75e97d85c9312e67b736f98a) +++ sources/gui/qml/USBProgressItem.qml (.../USBProgressItem.qml) (revision 97b77e88de3f6c41504ec5f9f3606a2143d27ff8) @@ -28,64 +28,38 @@ * The ProgressCircle turns red if the amount of free space left is less than defined (15% for now) * The percent value in the circle will show "USB" if the device is not present/ready. */ -Rectangle { id: _root // TEST : USB-Drive not present may need to be handled with better indication(s). - - signal clicked - signal doubleClicked - - readonly property int sizePowers : 1000000 - - readonly property alias totalText : _totalText.text +Rectangle { id: _root readonly property alias total : _progressCircle.maximum readonly property alias avail : _progressCircle.value - readonly property alias percent : _percent.text - property alias thickness : _progressCircle.thickness + readonly property int percent : 100 - _GuiView.usbPercent property bool displayInformation : true - enabled : _GuiView.usbIsReady color : Colors.transparent - anchors { - top : parent.top - right : parent.right - topMargin : 5 - rightMargin : 5 - } - width : 30 - height: width - radius: width + width : 30 + height : width + radius : width + Text { id: _percent - visible : displayInformation - anchors.centerIn: parent - color: ! _GuiView.usbIsReady ? Colors.red : Colors.white - text : ! _GuiView.usbIsReady ? qsTr("USB") : _GuiView.usbPercent - font.pixelSize: 12 - font.bold: true + visible : displayInformation + anchors.centerIn : parent + text : ! _GuiView.usbIsReady ? qsTr("USB") : + ("%1%\n%2") .arg(_root.percent) + .arg(qsTr("Used")) + color : Colors.offWhite + font.pixelSize : Fonts.fontPixelContainerUnitSmall + horizontalAlignment : Text.AlignHCenter + font.weight : Font.Medium } ProgressCircle { id: _progressCircle - anchors.fill: parent - diameter: _root.width - minimum : 0 - maximum : _GuiView.usbTotal / sizePowers // convert to MB since the value in byte is too big for ProgressCircle. - value : _GuiView.usbAvail / sizePowers // convert to MB since the value in byte is too big for ProgressCircle. - color : ! _GuiView.usbIsReady ? "red" : "green" - circleShadowColor: Colors.panelBorderColor + anchors.fill : parent + diameter : _root.width + minimum : 0 + maximum : 100 + value : _root.percent + color : ! _GuiView.usbIsReady ? "red" : Colors.borderButton + circleShadowColor : Colors.panelBorderColor + thickness : 5 } - Text { id: _totalText - visible : _GuiView.usbIsReady && displayInformation - anchors.top: parent.bottom - anchors.horizontalCenter: parent.horizontalCenter - color : Colors.white - text : Variables.sizeConverted( _GuiView.usbTotal, _root.sizePowers ) - font.pixelSize: 12 - font.bold: true - } - - MouseArea { id: _mouseArea - anchors.fill : parent - anchors.margins : -20 // since the object visual is so small make the mouseArea bigger for the human finger to easier touch. - onClicked : _root.clicked() - onDoubleClicked : _root.doubleClicked() - } } Index: sources/gui/qml/pages/settings/SettingsExportLogs.qml =================================================================== diff -u -rccea9f498ece7b6f75e97d85c9312e67b736f98a -r97b77e88de3f6c41504ec5f9f3606a2143d27ff8 --- sources/gui/qml/pages/settings/SettingsExportLogs.qml (.../SettingsExportLogs.qml) (revision ccea9f498ece7b6f75e97d85c9312e67b736f98a) +++ sources/gui/qml/pages/settings/SettingsExportLogs.qml (.../SettingsExportLogs.qml) (revision 97b77e88de3f6c41504ec5f9f3606a2143d27ff8) @@ -84,6 +84,7 @@ readonly property bool horizontalLayout : _GuiView.useLogLongName confirmVisible : false + backEnabled : ! _GuiView.exportRunning notificationMargin : Variables.defaultMargin * 2 notificationFontSize : Fonts.fontPixelStepNormal @@ -264,11 +265,7 @@ freeValue : Variables.sizeConverted( _GuiView.sdAvail, 1000, 3) totalValue : Variables.sizeConverted( _GuiView.sdTotal, 1000, 3) - contentItem: SDCProgressItem{ id: _SDC_progress - thickness : 5 -// displayInformation : false -// text : _SDC_progress.percent - } + contentItem : SDCProgressItem { id: _SDC_progress } } Rectangle { id : _sdcFolderRectangle @@ -303,7 +300,7 @@ folder : _sdcFolderColumn.currentTypeFolderApplication // FIXME: there has to be a View for this which also get changed by log type. } - delegate: ProgressBar { id : _sdcItemBackground + delegate: Item { id : _sdcItemBackground // *** IMPORTANT *** // QML kills the items when they get out of the view port in regards to the cacheBuffer, // and the next time it gets in the view port will be created with all the properties in their defaults. @@ -327,31 +324,39 @@ } } - MouseArea { - anchors.fill : parent - onClicked : exportListUpdate() + ProgressBar { id: _progressRect + anchors{ + fill : parent + leftMargin : Variables.defaultMargin + topMargin : 5 + bottomMargin : 5 + rightMargin : Variables.defaultMargin + + } + color : inExportList ? Colors.borderButton : Colors.transparent + bgColor : Colors.transparent + width : parent.width + height : parent.height + minimum : 0 + maximum : 100 // percent + value : maximum - _sdcItemBackground.exportPercent + z : 0 + radius : 5 + minText.visible : false + maxText.visible : false + marker.visible : false } - progress.z : 0 - minText.visible : false - maxText.visible : false - marker.visible : false - maximum : 100 // percent - value : maximum - exportPercent // Setting height and width to 0 when the file is not shown in the list because // it is a symlink or other conditions width : isShownInList ? _sdcFolderView.width : 0 height : isShownInList ? _contentRect.columnCellHeight : 0 - progress.anchors.bottomMargin : 5 - progress.anchors.topMargin : 5 - progress.anchors.leftMargin : Variables.defaultMargin - progress.width : width - progress.anchors.leftMargin * 2 + MouseArea { + anchors.fill : parent + onClicked : exportListUpdate() + } - bgColor : Colors.transparent - color : inExportList ? Colors.borderButton : Colors.transparent - radius : 5 - Item { width : isShownInList ? parent.width : 0 height : isShownInList ? _contentRect.columnCellHeight : 0 @@ -465,11 +470,7 @@ freeValue : Variables.sizeConverted( _GuiView.usbAvail, 1000, 3) totalValue : Variables.sizeConverted( _GuiView.usbTotal, 1000, 3) - contentItem: USBProgressItem { id: _USB_progress - thickness : 5 -// displayInformation : false -// text : _USB_progress.percent - } + contentItem : USBProgressItem { id: _USB_progress } } Rectangle { id : _usbFolderRectangle