Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions console_backend/src/status_bar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

Expand Down
53 changes: 13 additions & 40 deletions resources/SettingsTabComponents/SettingsPane.qml
Original file line number Diff line number Diff line change
Expand Up @@ -234,59 +234,23 @@ 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
}

Loader {
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 {
Expand Down Expand Up @@ -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
Expand Down