diff --git a/console_backend/src/status_bar.rs b/console_backend/src/status_bar.rs index 6c00fe6b1..3e180e765 100644 --- a/console_backend/src/status_bar.rs +++ b/console_backend/src/status_bar.rs @@ -182,10 +182,12 @@ impl StatusBar { status_bar_status.set_ins(&sb_update.ins_status); status_bar_status.set_data_rate(sb_update.data_rate); status_bar_status.set_solid_connection(sb_update.solid_connection); - status_bar_status.set_title(&format!( - "{} Swift Console {}", - sb_update.port, sb_update.version - )); + let port = if sb_update.port.is_empty() { + "".to_string() + } else { + sb_update.port + " - " + }; + status_bar_status.set_title(&format!("{port}Swift Console {}", sb_update.version)); client_sender.send_data(serialize_capnproto_builder(builder)); } diff --git a/resources/SettingsTabComponents/SettingsPane.qml b/resources/SettingsTabComponents/SettingsPane.qml index 4a45557f5..e65216faf 100644 --- a/resources/SettingsTabComponents/SettingsPane.qml +++ b/resources/SettingsTabComponents/SettingsPane.qml @@ -234,10 +234,10 @@ Rectangle { property string _fieldName: "description" visible: !!selectedRowField(_fieldName) - Layout.rowSpan: 2 + Layout.rowSpan: parents.rows - 8 Layout.columnSpan: 1 Layout.preferredWidth: parent.colWidthLabel - Layout.preferredHeight: isLongTextField(_fieldName) ? 2 * parent.smallRowHeight : parent.smallRowHeight + Layout.preferredHeight: Math.max(1, parent.height - 8 * parent.smallRowHeight) sourceComponent: settingRowLabel } @@ -245,48 +245,12 @@ Rectangle { property string _fieldName: "description" visible: !!selectedRowField(_fieldName) - Layout.rowSpan: 2 + Layout.rowSpan: parents.rows - 8 Layout.columnSpan: parent.columns - 1 Layout.preferredWidth: parent.colWidthField - Layout.preferredHeight: isLongTextField(_fieldName) ? 2 * parent.smallRowHeight : parent.smallRowHeight - sourceComponent: settingRowText - } - - Loader { - property string _title: "Notes" - property string _fieldName: "notes" - - visible: !!selectedRowField(_fieldName) - Layout.columnSpan: 1 - Layout.rowSpan: parent.rows - 7 - Layout.preferredHeight: Math.max(1, parent.height - 7 * parent.smallRowHeight) - Layout.preferredWidth: parent.colWidthLabel - sourceComponent: settingRowLabel - } - - Loader { - id: notes - - property string _fieldName: "notes" - - visible: !!selectedRowField(_fieldName) - Layout.columnSpan: parent.columns - 1 - Layout.rowSpan: parent.rows - 8 Layout.preferredHeight: Math.max(1, parent.height - 8 * parent.smallRowHeight) - Layout.preferredWidth: parent.colWidthField sourceComponent: settingRowText } - - Loader { - property string _fieldName: "notes" - - visible: !notes.visible - Layout.columnSpan: parent.columns - Layout.rowSpan: parent.rows - 8 - Layout.fillHeight: true - Layout.fillWidth: true - sourceComponent: emptyRow - } } ScrollBar.vertical: ScrollBar { @@ -326,7 +290,16 @@ Rectangle { anchors.fill: parent TextEdit { - text: selectedRowField(_fieldName) + text: { + if (_fieldName == "description") { + let desc = selectedRowField("description"); + let notes = selectedRowField("notes"); + if (notes) + return desc + "\n\nNotes:\n" + notes; + return desc; + } + return selectedRowField(_fieldName); + } anchors.fill: parent wrapMode: Text.WordWrap readOnly: true