Added some UI fixes
This commit is contained in:
@@ -4,9 +4,11 @@ import Utils 1.0
|
||||
|
||||
Rectangle {
|
||||
property bool enabled: false
|
||||
property bool neutral: true
|
||||
|
||||
implicitWidth: 18
|
||||
implicitHeight: 18
|
||||
radius: implicitWidth / 2
|
||||
color: enabled ? Palette.alternativeBackgroundColor : Palette.borderColor
|
||||
color: enabled ? Palette.goodColor :
|
||||
(neutral ? Palette.borderColor : Palette.invalidColor)
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@ TabButton {
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
elide: Text.ElideRight
|
||||
maximumLineCount: 2
|
||||
wrapMode: Text.Wrap
|
||||
}
|
||||
|
||||
background: Item {
|
||||
|
||||
@@ -169,6 +169,7 @@ ApplicationWindow {
|
||||
Controls.AvailabilityIndicator {
|
||||
id: connectionStatusIndicator
|
||||
enabled: false
|
||||
neutral: false
|
||||
Layout.alignment: Qt.AlignCenter
|
||||
}
|
||||
|
||||
|
||||
@@ -692,32 +692,36 @@ RowLayout {
|
||||
Controls.OutlineButton {
|
||||
text: qsTr("Read default settings")
|
||||
Layout.fillWidth: true
|
||||
onClicked: BmsInterface.commands().getBMSconfDefault()
|
||||
onClicked: if (BmsInterface.isPortConnected()) {
|
||||
BmsInterface.commands().getBMSconfDefault()
|
||||
}
|
||||
}
|
||||
|
||||
Controls.OutlineButton {
|
||||
text: qsTr("Read current settings from BMS")
|
||||
Layout.fillWidth: true
|
||||
onClicked: BmsInterface.commands().getBMSconf()
|
||||
onClicked: if (BmsInterface.isPortConnected()) {
|
||||
BmsInterface.commands().getBMSconf()
|
||||
}
|
||||
}
|
||||
|
||||
Controls.OutlineButton {
|
||||
text: qsTr("Write current values to BMS")
|
||||
Layout.fillWidth: true
|
||||
onClicked: {
|
||||
writeValuesToConfig()
|
||||
BmsInterface.commands().setBMSconf()
|
||||
}
|
||||
onClicked: if (BmsInterface.isPortConnected()) {
|
||||
writeValuesToConfig()
|
||||
BmsInterface.commands().setBMSconf()
|
||||
}
|
||||
}
|
||||
|
||||
Controls.Button {
|
||||
text: qsTr("Write to non-volatile memory of BMS")
|
||||
Layout.fillWidth: true
|
||||
onClicked: {
|
||||
needWait(true, qsTr("The settings are written to non-volatile memory.\nWait, please."))
|
||||
writeValuesToConfig()
|
||||
BmsInterface.commands().storeBMSConfig()
|
||||
}
|
||||
onClicked: if (BmsInterface.isPortConnected()) {
|
||||
needWait(true, qsTr("The settings are written to non-volatile memory.\nWait, please."))
|
||||
writeValuesToConfig()
|
||||
BmsInterface.commands().storeBMSConfig()
|
||||
}
|
||||
}
|
||||
|
||||
Layout.fillWidth: true
|
||||
|
||||
@@ -25,4 +25,6 @@ QtObject {
|
||||
|
||||
property color informationColor: "#4C68ED"
|
||||
property color invalidColor: "#A31C00"
|
||||
property color goodColor: "#009352"
|
||||
property color neutralColor: "#DFE0EB"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user