Index: leahi.qrc
===================================================================
diff -u -r544066717110941fc0133c22d197fd50953e65d5 -r810193ec7b4826c46c6f10813194d0c8bd7982f1
--- leahi.qrc (.../leahi.qrc) (revision 544066717110941fc0133c22d197fd50953e65d5)
+++ leahi.qrc (.../leahi.qrc) (revision 810193ec7b4826c46c6f10813194d0c8bd7982f1)
@@ -44,6 +44,7 @@
sources/gui/qml/dialogs/headerbar/WiFiDialog.qml
+ sources/gui/qml/dialogs/headerbar/StorageDialog.qml
resources/images/Logo d.png
Index: sources/gui/qml/SDCProgressItem.qml
===================================================================
diff -u -ra5760947d3ed0d2748ba023a1c25e3c6aa0b1de1 -r810193ec7b4826c46c6f10813194d0c8bd7982f1
--- sources/gui/qml/SDCProgressItem.qml (.../SDCProgressItem.qml) (revision a5760947d3ed0d2748ba023a1c25e3c6aa0b1de1)
+++ sources/gui/qml/SDCProgressItem.qml (.../SDCProgressItem.qml) (revision 810193ec7b4826c46c6f10813194d0c8bd7982f1)
@@ -40,6 +40,8 @@
readonly property alias avail : _progressCircle.value
readonly property alias percent : _percent.text
property alias thickness : _progressCircle.thickness
+ property alias circleShadowColor : _progressCircle.circleShadowColor
+ property color textColor : Colors.white
property bool displayInformation : true
@@ -56,7 +58,7 @@
Text { id: _percent
visible : displayInformation
anchors.centerIn: parent
- color: ! _GuiView.sdIsReady ? Colors.red : _GuiView.sdIsReadOnly ? "gray" : Colors.white
+ color: ! _GuiView.sdIsReady ? Colors.red : _GuiView.sdIsReadOnly ? "gray" : _root.textColor
text : ! _GuiView.sdIsReady ? qsTr("SD") : _GuiView.sdPercent
font.pixelSize: 12
font.bold: true
@@ -73,7 +75,7 @@
visible : _GuiView.sdIsReady && displayInformation
anchors.top: parent.bottom
anchors.horizontalCenter: parent.horizontalCenter
- color : Colors.white
+ color : _root.textColor
text : Variables.sizeConverted( _GuiView.sdTotal, _root.sizePowers )
font.pixelSize: 12
font.bold: true
Index: sources/gui/qml/components/HeaderBar.qml
===================================================================
diff -u -red8be1a75c2b1b3cc9f5e919fd38e135f707eac6 -r810193ec7b4826c46c6f10813194d0c8bd7982f1
--- sources/gui/qml/components/HeaderBar.qml (.../HeaderBar.qml) (revision ed8be1a75c2b1b3cc9f5e919fd38e135f707eac6)
+++ sources/gui/qml/components/HeaderBar.qml (.../HeaderBar.qml) (revision 810193ec7b4826c46c6f10813194d0c8bd7982f1)
@@ -95,11 +95,7 @@
highlightHeight : 15
isMainTreatment : true
- onHiddenChanged: {
- if (hidden) {
- index = 0
- }
- }
+ onHiddenChanged: { if (hidden) { index = 0 } }
}
Row { id: _headerButtonRow
@@ -116,7 +112,7 @@
iconImageSource : "qrc:/images/iPrescription"
extraSpace : _headerButtonRow.spacing
- onPressed: print("Prescription button pressed!")
+ onPressed : print("Prescription button pressed!")
}
IconButton { id : _wifiButton
@@ -131,39 +127,39 @@
iconImageSource : "qrc:/images/iBluetooth"
extraSpace : _headerButtonRow.spacing
- onPressed: print("Bluetooth button pressed!")
+ onPressed : print("Bluetooth button pressed!")
}
IconButton { id : _cloudSyncButton
iconSize : Variables.headerIconDiameter
iconImageSource : "qrc:/images/iCloudSync"
extraSpace : _headerButtonRow.spacing
- onPressed: print("CloudSync button pressed!")
+ onPressed : print("CloudSync button pressed!")
}
IconButton { id : _storageButton
iconSize : Variables.headerIconDiameter
iconImageSource : "qrc:/images/iStorage"
extraSpace : _headerButtonRow.spacing
- onPressed: print("Storage button pressed!")
+ onPressed : _storageDialog.openDialog(_storageButton)
}
IconButton { id : _settingsButton
iconSize : Variables.headerIconDiameter
iconImageSource : "qrc:/images/iSettings"
extraSpace : _headerButtonRow.spacing
- onPressed: print("Settings button pressed!")
+ onPressed : print("Settings button pressed!")
}
IconButton { id : _informationButton
iconSize : Variables.headerIconDiameter
iconImageSource : "qrc:/images/iInformation"
extraSpace : _headerButtonRow.spacing
- onPressed: print("Information button pressed!")
+ onPressed : print("Information button pressed!")
}
}
}
Index: sources/gui/qml/dialogs/headerbar/StorageDialog.qml
===================================================================
diff -u
--- sources/gui/qml/dialogs/headerbar/StorageDialog.qml (revision 0)
+++ sources/gui/qml/dialogs/headerbar/StorageDialog.qml (revision 810193ec7b4826c46c6f10813194d0c8bd7982f1)
@@ -0,0 +1,40 @@
+import QtQuick 2.12
+
+import "qrc:/"
+import "qrc:/components"
+import "qrc:/globals"
+
+HeaderBarPopup { id: _root
+ readonly property int progressCircleHeight : 70
+
+ contentItem: Row { id : _dialogRow
+ anchors.centerIn : parent
+
+ Item { id: _progressItem
+ height : _root.progressCircleHeight
+ width : height
+
+ SDCProgressItem { id: _SDC_progressItem
+ thickness : 10
+ anchors.fill : parent
+ circleShadowColor : Colors.dialogShadowColor
+ textColor : Colors.dialogText
+ }
+ }
+
+ Column { id : _dialogColumn
+ Repeater { id: _repeater
+ model: [("%1 (%2)") .arg(qsTr("SD-Card")) .arg("MB"),
+ ("%1: %2") .arg(qsTr("Free")) .arg(Variables.sizeConverted( _GuiView.sdAvail, 1000, 3)),
+ ("%1: %2") .arg(qsTr("Total")) .arg(Variables.sizeConverted( _GuiView.sdTotal, 1000, 3))]
+
+ delegate: Text {
+ anchors.right: _dialogColumn.right
+ color : Colors.dialogText
+ text : modelData
+ font.pixelSize : Fonts.fontPixelDialogText
+ }
+ }
+ }
+ }
+}
Index: sources/gui/qml/globals/Colors.qml
===================================================================
diff -u -r3bee9f20350882eca47f3d18b0accf5bec3933d4 -r810193ec7b4826c46c6f10813194d0c8bd7982f1
--- sources/gui/qml/globals/Colors.qml (.../Colors.qml) (revision 3bee9f20350882eca47f3d18b0accf5bec3933d4)
+++ sources/gui/qml/globals/Colors.qml (.../Colors.qml) (revision 810193ec7b4826c46c6f10813194d0c8bd7982f1)
@@ -55,6 +55,7 @@
readonly property color backgroundUltrafiltrationButton : "#31568F"
readonly property color textValueUltrafiltrationButtonFg: "#98aec2"
readonly property color dialogText : "#343434"
+ readonly property color dialogShadowColor : "#334E759C"
readonly property color backgroundRangeRect : "#3e546e"
readonly property color highlightProgressBar : "#3d8eef"
Index: sources/gui/qml/main.qml
===================================================================
diff -u -r6d2d7392d9fbae0d24a79fabd0619d446025a946 -r810193ec7b4826c46c6f10813194d0c8bd7982f1
--- sources/gui/qml/main.qml (.../main.qml) (revision 6d2d7392d9fbae0d24a79fabd0619d446025a946)
+++ sources/gui/qml/main.qml (.../main.qml) (revision 810193ec7b4826c46c6f10813194d0c8bd7982f1)
@@ -344,6 +344,7 @@
KeyboardItem { id: _keyboard }
WiFiDialog { id: _wifiDialog }
+ StorageDialog { id: _storageDialog }
LockDialog { id: _lockDialog }
AlarmItem { id: _alarmItem ; z: 996 }
PowerItem { id: _powerItem ; z: 997 }