Index: sources/gui/qml/pages/settings/SettingsCalibrationSettings.qml =================================================================== diff -u -rbb3bfd135aa8216edb4d8f83ef6e4ecf311b2b43 -rfd13750406289b7fd9d49c7827ad143fe246278f --- sources/gui/qml/pages/settings/SettingsCalibrationSettings.qml (.../SettingsCalibrationSettings.qml) (revision bb3bfd135aa8216edb4d8f83ef6e4ecf311b2b43) +++ sources/gui/qml/pages/settings/SettingsCalibrationSettings.qml (.../SettingsCalibrationSettings.qml) (revision fd13750406289b7fd9d49c7827ad143fe246278f) @@ -8,7 +8,6 @@ import "qrc:/compounds" import "qrc:/dialogs" - SettingsBase { id: _root itemIndex : SettingsStack.CalibrationSettings confirmVisible : false @@ -38,7 +37,8 @@ qsTr("Acid Types" ) , qsTr("Bicarb Types" ) , qsTr("Accelerometer" ) , - qsTr("Blood Leak" ) + qsTr("Blood Leak" ) , + qsTr("Conductivity" ) ] onActivated: vCalibrationSettings.refreshList(currentIndex) @@ -50,13 +50,17 @@ leftPadding : Variables.defaultMargin * 2 text : _headerText.title color : Colors.white - font.pixelSize : Fonts.fontPixelTextRectTitle + font.pixelSize : Fonts.fontPixelDefaultButton font.weight : Font.Medium } contentItem: Item { id: _contentItem anchors.fill : parent readonly property int contentWith: _listView.width - Variables.defaultMargin //* 2 // added margin to have scroll bar show on right + readonly property bool largePayload : vCalibrationSettings.columnTitle.length > 9 + readonly property int titleWidth : contentWith * ( largePayload ? 0.17 : 0.3 ) + readonly property int componentWidth: contentWith * ( largePayload ? 0.07 : 0.1 ) + readonly property int payloadWidth : contentWith * ( largePayload ? 0.76 : 0.6 ) Rectangle { id: _header color : Colors.treatmentSectionHeader @@ -68,11 +72,11 @@ width : _contentItem.width height : Variables.institutionaltContainerHeight - HeaderText { title: qsTr("Description"); width: _contentItem.width * 0.3 } - HeaderText { title: qsTr("Component"); width: _contentItem.width * 0.1; leftPadding: 0 } + HeaderText { title: qsTr("Description"); width: _contentItem.titleWidth } + HeaderText { title: qsTr("Component"); width: _contentItem.componentWidth; leftPadding: 0 } Row { id: _headerComponentRow - width : _contentItem.width * 0.6 + width : _contentItem.payloadWidth height : Variables.institutionaltContainerHeight Repeater { id: _repeater @@ -121,15 +125,15 @@ width : _contentItem.contentWith radius : 8.5 color : Colors.panelBackgroundColor + clip : true border { width: 1 color: _mouseArea.pressed || _editButton.isPressed ? Colors.borderButton : Colors.panelBorderColor } MouseArea { id: _mouseArea anchors.fill : parent - anchors.rightMargin: _contentItem.width / 2 - onClicked : _root.openDialog(index) + onClicked : _root.openDialog(index) } IconButton { id : _editButton @@ -144,14 +148,15 @@ } Row { id: _delegateRow + width : _contentItem.width height : Variables.institutionaltContainerHeight - HeaderText { title: model.title; width: _contentItem.width * 0.3; font.weight: Font.Normal; leftPadding: Variables.defaultMargin * 3 } - HeaderText { title: model.component; width: _contentItem.width * 0.1 } + HeaderText { title: model.title; width: _contentItem.titleWidth; font.weight: Font.Normal; leftPadding: Variables.defaultMargin * 3 } + HeaderText { title: model.component; width: _contentItem.componentWidth } Row { id: _delegateComponentRow - width : _contentItem.width * 0.6 + width : _contentItem.payloadWidth height : Variables.institutionaltContainerHeight Repeater { id: _delegateRepeater @@ -162,12 +167,11 @@ title : isCalTime ? modelData : Number(modelData).toFixed(3) height : Variables.institutionaltContainerHeight - leftPadding : 0 + leftPadding : isCalTime && _contentItem.largePayload ? Variables.defaultMargin * -1 : 0 width : _delegateComponentRow.width / vCalibrationSettings.columnTitle.length verticalAlignment : Text.AlignVCenter - font.pixelSize : isCalTime ? Fonts.fontPixelDefaultButton : Fonts.fontPixelTextRectTitle + font.pixelSize : isCalTime && _contentItem.largePayload ? 16 : Fonts.fontPixelDefaultButton - } } }