File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed
src/FactSystem/FactControls Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ import QGroundControl.Controls
77import QGroundControl.FactControls
88
99Rectangle {
10- property alias label : factTextField . label
10+ property string label
1111 property alias fact: factTextField .fact
1212 property alias textFieldPreferredWidth: factTextField .textFieldPreferredWidth
1313 property alias textFieldUnitsLabel: factTextField .textFieldUnitsLabel
@@ -66,16 +66,18 @@ Rectangle {
6666 spacing: ScreenTools .defaultFontPixelWidth
6767
6868 QGCCheckBox {
69- id: enableCheckbox
70- visible: control .showEnableCheckbox
69+ id: enableCheckbox
70+ Layout .fillWidth : visible
71+ text: control .label
72+ visible: control .showEnableCheckbox
7173
7274 onClicked: control .enableCheckboxClicked ()
7375 }
7476
7577 LabelledFactTextField {
7678 id: factTextField
77- Layout .fillWidth : true
78- label: control .label
79+ Layout .fillWidth : ! control . showEnableCheckbox
80+ label: control .showEnableCheckbox ? " " : control . label
7981 fact: control .fact
8082 enabled: ! control .showEnableCheckbox || enableCheckbox .checked
8183 }
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ RowLayout {
2828 QGCLabel {
2929 Layout .fillWidth : true
3030 text: label
31+ visible: label !== " "
3132 }
3233
3334 FactTextField {
You can’t perform that action at this time.
0 commit comments