Index: sources/gui/qml/components/BaseComboBox.qml =================================================================== diff -u -r10d95daf091fedda008906727088648f66ae5bac -rde099919f262c3429cb0592ef71deb6a16e92892 --- sources/gui/qml/components/BaseComboBox.qml (.../BaseComboBox.qml) (revision 10d95daf091fedda008906727088648f66ae5bac) +++ sources/gui/qml/components/BaseComboBox.qml (.../BaseComboBox.qml) (revision de099919f262c3429cb0592ef71deb6a16e92892) @@ -28,6 +28,7 @@ property alias dropDownWidth : _popup.width property int delegateWidth : dropDownWidth property int delegateHeight : height + property bool canOff : false width : 300 displayText : _root.isActive ? currentText : Variables.emptyEntry @@ -37,16 +38,15 @@ signal clear() - onClear : { - currentIndex = 0 - } + onClear : { currentIndex = 0 } contentItem: Text { id: _displayText - text : parent.displayText + text : canOff && parent.displayText === "0" ? qsTr("OFF") : parent.displayText color : Colors.offWhite font.pixelSize : _root.isActive ? Fonts.fontPixelTextRectTitle : Fonts.fontPixelValueControl verticalAlignment : Text.AlignVCenter - horizontalAlignment : _root.isActive ? undefined : Text.AlignHCenter + horizontalAlignment : Text.AlignHCenter + rightPadding : _icon.width } background: Rectangle { id: _background @@ -60,11 +60,11 @@ highlighted : _root.highlightedIndex === index contentItem: Text { - text : modelData + text : canOff && modelData === "0" ? qsTr("OFF") : modelData color : Colors.offWhite font : _root.font verticalAlignment : Text.AlignVCenter - leftPadding : 30 + horizontalAlignment : Text.AlignHCenter } background: Rectangle {