@@ -217,60 +217,24 @@ Rectangle {
217
217
property string _fieldName: " description"
218
218
219
219
visible: !! selectedRowField (_fieldName)
220
- Layout .rowSpan : 2
220
+ Layout .rowSpan : parent . rows - 8
221
221
Layout .columnSpan : 1
222
222
Layout .preferredWidth : parent .colWidthLabel
223
- Layout .preferredHeight : isLongTextField (_fieldName) ? 2 * parent .smallRowHeight : parent . smallRowHeight
223
+ Layout .preferredHeight : Math . max ( 1 , parent . height - 8 * parent .smallRowHeight )
224
224
sourceComponent: settingRowLabel
225
225
}
226
226
227
227
Loader {
228
228
property string _fieldName: " description"
229
229
230
230
visible: !! selectedRowField (_fieldName)
231
- Layout .rowSpan : 2
231
+ Layout .rowSpan : parent . rows - 8
232
232
Layout .columnSpan : parent .columns - 1
233
233
Layout .preferredWidth : parent .colWidthField
234
- Layout .preferredHeight : isLongTextField (_fieldName) ? 2 * parent .smallRowHeight : parent .smallRowHeight
235
- sourceComponent: settingRowText
236
- }
237
-
238
- Loader {
239
- property string _title: " Notes"
240
- property string _fieldName: " notes"
241
-
242
- visible: !! selectedRowField (_fieldName)
243
- Layout .columnSpan : 1
244
- Layout .rowSpan : parent .rows - 7
245
- Layout .preferredHeight : Math .max (1 , parent .height - 7 * parent .smallRowHeight )
246
- Layout .preferredWidth : parent .colWidthLabel
247
- sourceComponent: settingRowLabel
248
- }
249
-
250
- Loader {
251
- id: notes
252
-
253
- property string _fieldName: " notes"
254
-
255
- visible: !! selectedRowField (_fieldName)
256
- Layout .columnSpan : parent .columns - 1
257
- Layout .rowSpan : parent .rows - 8
258
234
Layout .preferredHeight : Math .max (1 , parent .height - 8 * parent .smallRowHeight )
259
- Layout .preferredWidth : parent .colWidthField
260
235
sourceComponent: settingRowText
261
236
}
262
237
263
- Loader {
264
- property string _fieldName: " notes"
265
-
266
- visible: ! notes .visible
267
- Layout .columnSpan : parent .columns
268
- Layout .rowSpan : parent .rows - 8
269
- Layout .fillHeight : true
270
- Layout .fillWidth : true
271
- sourceComponent: emptyRow
272
- }
273
-
274
238
}
275
239
276
240
ScrollBar .vertical : ScrollBar {
@@ -314,7 +278,17 @@ Rectangle {
314
278
anchors .fill : parent
315
279
316
280
TextEdit {
317
- text: selectedRowField (_fieldName)
281
+ text: {
282
+ if (_fieldName == " description" ) {
283
+ let desc = selectedRowField (" description" );
284
+ let notes = selectedRowField (" notes" );
285
+ if (notes)
286
+ return desc + " \n\n Notes:\n " + notes;
287
+
288
+ return notes;
289
+ }
290
+ return selectedRowField (_fieldName);
291
+ }
318
292
anchors .fill : parent
319
293
wrapMode: Text .WordWrap
320
294
readOnly: true
0 commit comments