Index: leahi.qrc
===================================================================
diff -u -rbd083c017790f073bf4a296e05faf803a240f29f -r78aa5e70b591b3544ff9d9e6b772fe07deaa2f0f
--- leahi.qrc (.../leahi.qrc) (revision bd083c017790f073bf4a296e05faf803a240f29f)
+++ leahi.qrc (.../leahi.qrc) (revision 78aa5e70b591b3544ff9d9e6b772fe07deaa2f0f)
@@ -131,6 +131,8 @@
resources/images/recirculate_main.png
resources/images/bloodpump.png
resources/images/edit_yellow.png
+ resources/images/moon.png
+ resources/images/sun.png
sources/gui/qml/components/MainMenu.qml
Index: sources/gui/qml/components/BaseSwitch.qml
===================================================================
diff -u -r3d5bd682a4dc4bd36e26ca17067bafd489fa970b -r78aa5e70b591b3544ff9d9e6b772fe07deaa2f0f
--- sources/gui/qml/components/BaseSwitch.qml (.../BaseSwitch.qml) (revision 3d5bd682a4dc4bd36e26ca17067bafd489fa970b)
+++ sources/gui/qml/components/BaseSwitch.qml (.../BaseSwitch.qml) (revision 78aa5e70b591b3544ff9d9e6b772fe07deaa2f0f)
@@ -23,22 +23,33 @@
property bool active : true
property real diameter : Variables.sliderCircleDiameter
property int margin : 4
+ property string source : ""
+ property string activeColor : Colors.backgroundButtonSelect
+ property string inactiveColor : Colors.createTreatmentInactive
+ property string knobColor : _root.active ? Colors.textMain : Colors.borderDisableButton
+
indicator: Rectangle {
implicitWidth : Variables.sliderCircleDiameter * 2.5
implicitHeight : Variables.sliderCircleDiameter + ( _root.margin * 2 )
radius : implicitHeight
anchors.centerIn: parent
- color : _root.checked && _root.active ? Colors.backgroundButtonSelect : Colors.createTreatmentInactive
- border.color : _root.checked && _root.active ? Colors.borderButton : Colors.createTreatmentInactive
+ color : _root.checked && _root.active ? _root.activeColor : _root.inactiveColor
+ border.color : _root.checked && _root.active ? _root.activeColor : _root.inactiveColor
Rectangle {
x: _root.checked ? parent.width - width - _root.margin : _root.margin
anchors.verticalCenter: parent.verticalCenter
width : _root.diameter
height : _root.diameter
radius : _root.diameter
- color : _root.active ? Colors.textMain : Colors.borderDisableButton
+ color : _root.knobColor
+ Image {
+ source : _root.source
+ visible: _root.source
+ anchors.centerIn: parent
+ }
+
Behavior on x { NumberAnimation { duration: 150; easing.type: Easing.InOutQuad } }
}
}
Index: sources/gui/qml/compounds/AutoStepController.qml
===================================================================
diff -u -rd00eeb4a8b354eade40a0853c022eb03ea4ae233 -r78aa5e70b591b3544ff9d9e6b772fe07deaa2f0f
--- sources/gui/qml/compounds/AutoStepController.qml (.../AutoStepController.qml) (revision d00eeb4a8b354eade40a0853c022eb03ea4ae233)
+++ sources/gui/qml/compounds/AutoStepController.qml (.../AutoStepController.qml) (revision 78aa5e70b591b3544ff9d9e6b772fe07deaa2f0f)
@@ -48,7 +48,7 @@
maximum : 100
thickness : 4
visible : _root.isPlaying
- color : Colors.borderButton
+ color : Colors.modeAutoStepProgressColor
circleShadowColor : Colors.transparent
// Smooth progress animation
Index: sources/gui/qml/compounds/InstructionView.qml
===================================================================
diff -u -rd00eeb4a8b354eade40a0853c022eb03ea4ae233 -r78aa5e70b591b3544ff9d9e6b772fe07deaa2f0f
--- sources/gui/qml/compounds/InstructionView.qml (.../InstructionView.qml) (revision d00eeb4a8b354eade40a0853c022eb03ea4ae233)
+++ sources/gui/qml/compounds/InstructionView.qml (.../InstructionView.qml) (revision 78aa5e70b591b3544ff9d9e6b772fe07deaa2f0f)
@@ -89,16 +89,16 @@
height : 50
width : height
radius : height
- color : index === _root.currentIndex ? Colors.borderButton : Colors.modeBackgroundColor
+ color : index === _root.currentIndex ? Colors.modeButtonColor : Colors.modeBackgroundColor
border {
- color: Colors.borderButton
+ color: Colors.modeButtonColor
width: 2
}
Text { id: _stepNumberRect
anchors.centerIn: parent
text : index + 1
- color : Colors.darkMode ? Colors.offWhite : index === _root.currentIndex ? Colors.modeBackgroundColor : Colors.borderButton
+ color : Colors.darkMode ? Colors.offWhite : index === _root.currentIndex ? Colors.modeBackgroundColor : Colors.modeButtonColor
font.pixelSize : 28
font.weight : Font.Medium
}
Index: sources/gui/qml/dialogs/AlarmDialog.qml
===================================================================
diff -u -rd00eeb4a8b354eade40a0853c022eb03ea4ae233 -r78aa5e70b591b3544ff9d9e6b772fe07deaa2f0f
--- sources/gui/qml/dialogs/AlarmDialog.qml (.../AlarmDialog.qml) (revision d00eeb4a8b354eade40a0853c022eb03ea4ae233)
+++ sources/gui/qml/dialogs/AlarmDialog.qml (.../AlarmDialog.qml) (revision 78aa5e70b591b3544ff9d9e6b772fe07deaa2f0f)
@@ -32,7 +32,7 @@
property int headerOverlap : 30
anchors.fill: parent
- color : Colors.modeBackgroundColor
+ color : Colors.modeBackgroundDialogColor
radius : Variables.alarmDialogRadius
@@ -93,7 +93,7 @@
}
Rectangle { id: _descriptionRect
- color : Colors.modeBackgroundColor
+ color : Colors.modeBackgroundDialogColor
clip : true
anchors {
@@ -117,7 +117,7 @@
ListView {id: _listView
anchors {
top : _autoStepController.bottom
- topMargin : Variables.defaultMargin
+ topMargin : Variables.defaultMargin * 2
bottom : parent.bottom
left : parent.left
leftMargin : Variables.defaultMargin * 4
@@ -135,19 +135,19 @@
clip : true
Rectangle { id: _stepRect
- height : 40
+ height : 50
width : height
radius : height
- color : _delegateControl.ListView.isCurrentItem ? Colors.borderButton : Colors.modeBackgroundColor
+ color : _delegateControl.ListView.isCurrentItem ? Colors.modeButtonColor : Colors.modeAlarmStepButtonColor
border {
- color: Colors.borderButton
+ color: Colors.modeButtonColor
width: 2
}
Text { id: _stepNumberRect
anchors.centerIn: parent
text : index + 1
- color : Colors.darkMode ? Colors.offWhite : _delegateControl.ListView.isCurrentItem ? Colors.fixedColor : Colors.borderButton
+ color : Colors.darkMode ? Colors.offWhite : _delegateControl.ListView.isCurrentItem ? Colors.modeBackgroundColor : Colors.modeButtonColor
font.pixelSize : 20
font.weight : Font.Medium
}
@@ -210,7 +210,7 @@
leftMargin : Variables.defaultMargin * 4
}
- color : "#FFECEC"
+ color : Colors.modeAlarmStopStateColor
radius : height
Text { id: _astrix
@@ -232,11 +232,10 @@
left: _astrix.right
}
- color : "black"
- text : qsTr("Rinseback will not be allowed in:")
+ color : Colors.modeTextColor
+ text : qsTr("Return Blood will not be allowed in:")
font.pixelSize : 25
font.weight : Font.Medium
-
}
TimeText { id: _timeoutText
@@ -279,59 +278,64 @@
onPressed : resumeClicked()
text.text : qsTr("Resume")
width : _buttonGroup.buttonsWidth
+ isDefault : Colors.darkMode
backgroundColor: Colors.transparent
- fgColor : isPressed ? Colors.white : borderColor
+ fgColor : isPressed ? Colors.offWhite : Colors.modeAlarmButtonPressedColor
selectColor : Qt.darker(borderColor, 1.15)
pixelSize : Fonts.fontPixelNotification
- borderColor : Colors.alarmButton
+ borderColor : Colors.modeAlarmButtonColor
}
TouchRect { id : _temporaryBreak
visible : temporaryBreakVisible
onPressed : temporaryBreakClicked()
text.text : qsTr("Temporary Break")
width : _buttonGroup.buttonsWidth
+ isDefault : Colors.darkMode
backgroundColor: Colors.transparent
- fgColor : isPressed ? Colors.white : borderColor
+ fgColor : isPressed ? Colors.offWhite : Colors.modeAlarmButtonPressedColor
selectColor : Qt.darker(borderColor, 1.15)
pixelSize : Fonts.fontPixelNotification
- borderColor : Colors.alarmButton
+ borderColor : Colors.modeAlarmButtonColor
}
TouchRect { id : _rinsebackTouchRect
visible : rinsebackVisible
onPressed : rinsebackClicked()
text.text : qsTr("Return Blood & End Treatment")
width : _buttonGroup.buttonsWidth
+ isDefault : Colors.darkMode
backgroundColor: Colors.transparent
- fgColor : isPressed ? Colors.white : borderColor
+ fgColor : isPressed ? Colors.offWhite : Colors.modeAlarmButtonPressedColor
selectColor : Qt.darker(borderColor, 1.15)
pixelSize : Fonts.fontPixelNotification
- borderColor : Colors.alarmButton
+ borderColor : Colors.modeAlarmButtonColor
}
TouchRect { id : _endTouchRect
visible : endVisible
onPressed : endClicked()
text.text : qsTr("End Treatment Only")
width : _buttonGroup.buttonsWidth
+ isDefault : Colors.darkMode
backgroundColor: Colors.transparent
- fgColor : isPressed ? Colors.white : borderColor
+ fgColor : isPressed ? Colors.offWhite : Colors.modeAlarmButtonPressedColor
selectColor : Qt.darker(borderColor, 1.15)
pixelSize : Fonts.fontPixelNotification
- borderColor : Colors.alarmButton
+ borderColor : Colors.modeAlarmButtonColor
}
TouchRect { id : _okTouchRect
visible : okVisible
onPressed : okClicked()
text.text : qsTr("OK")
width : _buttonGroup.buttonsWidth
+ isDefault : Colors.darkMode
backgroundColor: Colors.transparent
- fgColor : isPressed ? Colors.white : borderColor
+ fgColor : isPressed ? Colors.offWhite : Colors.modeAlarmButtonPressedColor
selectColor : Qt.darker(borderColor, 1.15)
pixelSize : Fonts.fontPixelNotification
- borderColor : Colors.alarmButton
+ borderColor : Colors.modeAlarmButtonColor
}
}
@@ -344,7 +348,7 @@
leftMargin : Variables.defaultMargin * 3
bottomMargin: Variables.defaultMargin
}
- color : Colors.modeTextColor
+ color : Colors.modeAlarmListColor
font.pixelSize : Fonts.fontPixelAlarmID
}
Index: sources/gui/qml/dialogs/AlarmListDialog.qml
===================================================================
diff -u -rd00eeb4a8b354eade40a0853c022eb03ea4ae233 -r78aa5e70b591b3544ff9d9e6b772fe07deaa2f0f
--- sources/gui/qml/dialogs/AlarmListDialog.qml (.../AlarmListDialog.qml) (revision d00eeb4a8b354eade40a0853c022eb03ea4ae233)
+++ sources/gui/qml/dialogs/AlarmListDialog.qml (.../AlarmListDialog.qml) (revision 78aa5e70b591b3544ff9d9e6b772fe07deaa2f0f)
@@ -35,11 +35,11 @@
property int alarmID : -1
property bool minVisible : true
- property color contentbackgroundColor : Colors.modeBackgroundColor
+ property color contentbackgroundColor : Colors.modeBackgroundDialogColor
property int headerOverlap : 30
anchors.fill: parent
- color : Colors.modeBackgroundColor
+ color : Colors.modeBackgroundDialogColor
radius : Variables.alarmDialogRadius
signal muteClicked()
@@ -116,7 +116,7 @@
visible : ! vAlarmActiveList.adjustment_Accepted
text : vAlarmActiveList.status
objectName: "_NotificationDialog_Description"
- color: Colors.offWhite
+ color: Colors.modeAlarmListColor
font.pixelSize: Fonts.fontPixelButton
anchors {
horizontalCenter: parent.horizontalCenter;
@@ -140,8 +140,8 @@
itemWidth : width
rowSpacing : 0
colSpacing : 0
- lineColor : Colors.offWhite
- textColor : Colors.offWhite
+ lineColor : Colors.modeAlarmListColor
+ textColor : Colors.modeAlarmListColor
itemsText : vAlarmActiveList.alarmIDs
itemsValue : vAlarmActiveList.alarmTexts
itemsTouchable : [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ]
Index: sources/gui/qml/dialogs/headerbar/HeaderbarSettings.qml
===================================================================
diff -u -r69c86c57349b7d4a6ba47a801ba27b1c470fade5 -r78aa5e70b591b3544ff9d9e6b772fe07deaa2f0f
--- sources/gui/qml/dialogs/headerbar/HeaderbarSettings.qml (.../HeaderbarSettings.qml) (revision 69c86c57349b7d4a6ba47a801ba27b1c470fade5)
+++ sources/gui/qml/dialogs/headerbar/HeaderbarSettings.qml (.../HeaderbarSettings.qml) (revision 78aa5e70b591b3544ff9d9e6b772fe07deaa2f0f)
@@ -35,6 +35,18 @@
onValueChanged : vAdjustmentAlarmVolume.doAdjustment( slider.value )
}
+
+ BaseSwitch { id: _darkMode
+ source : Colors.darkMode ? "qrc:/images/iMoon" : "qrc:/images/iSun"
+ checked : Colors.darkMode
+ activeColor : "#2C4F77"
+ inactiveColor : "#F5DDB0"
+ knobColor : Colors.darkMode ? "#1A344D" : "#FDB635"
+
+ onClicked: {
+ Colors.darkMode = ! Colors.darkMode
+ }
+ }
}
Connections { target: vAdjustmentAlarmVolume
Index: sources/gui/qml/globals/Colors.qml
===================================================================
diff -u -rd00eeb4a8b354eade40a0853c022eb03ea4ae233 -r78aa5e70b591b3544ff9d9e6b772fe07deaa2f0f
--- sources/gui/qml/globals/Colors.qml (.../Colors.qml) (revision d00eeb4a8b354eade40a0853c022eb03ea4ae233)
+++ sources/gui/qml/globals/Colors.qml (.../Colors.qml) (revision 78aa5e70b591b3544ff9d9e6b772fe07deaa2f0f)
@@ -27,19 +27,26 @@
* whcih is going to be used in the project
*/
QtObject {
- property bool darkMode : false
+ property bool darkMode : true // initial mode
+ readonly property color modeBackgroundColor : darkMode ? panelBackground : offWhite
+ readonly property color modeBackgroundDialogColor : darkMode ? "#1D3750" : offWhite
+ readonly property color modeSelctedColor : darkMode ? "#CFCFCF" : "#18559E"
+ readonly property color modeAutoStepColor : darkMode ? statusTextPaused : "#3682ED"
+ readonly property color modeAutoStepProgressColor : darkMode ? borderButton : statusTextPaused
+ readonly property color modeTextColor : darkMode ? offWhite : backgroundMainMenu
+ readonly property color modeButtonColor : darkMode ? borderButton : backgroundMainMenu
+ readonly property color modeAlarmButtonColor : darkMode ? "#1D3750" : "#18559E"
+ readonly property color modeAlarmStepButtonColor : darkMode ? "#1D3750" : offWhite
+ readonly property color modeAlarmButtonPressedColor : darkMode ? offWhite : "#18559E"
+ readonly property color modeAlarmListColor : darkMode ? offWhite : alarmDialogText
+ readonly property color modeAlarmStopStateColor : darkMode ? "#304053" : "#FFECEC"
+
readonly property color red : "#c53b33" // red
readonly property color white : "white" // white
readonly property color transparent : "Transparent" // No Color
readonly property color offWhite : "#FEFEFE"
- readonly property color modeBackgroundColor : darkMode ? panelBackground : offWhite
- readonly property color modeSelctedColor : darkMode ? "#CFCFCF" : "#18559E"
- readonly property color modeAutoStepColor : darkMode ? statusTextPaused : "#3682ED"
- readonly property color modeTextColor : darkMode ? offWhite : backgroundMainMenu
- readonly property color modeButtonColor : darkMode ? borderButton : backgroundMainMenu
-
readonly property color separatorLine : "#5f809d"
readonly property color backgroundMain : "#1A344D" //// ----- @LEAHIZED
readonly property color backgroundButtonNormal : transparent