refactor: simplify StatusTab UI layout
This commit is contained in:
@@ -109,12 +109,6 @@ ColumnLayout {
|
|||||||
function parseAndSavePendingRead() {
|
function parseAndSavePendingRead() {
|
||||||
deviceController.parseAndSaveData(root.currentFamilyCode(), deviceController.selectedPort || "");
|
deviceController.parseAndSaveData(root.currentFamilyCode(), deviceController.selectedPort || "");
|
||||||
}
|
}
|
||||||
function getCsvFileName() {
|
|
||||||
var path = root.csvPath;
|
|
||||||
if (!path) return "";
|
|
||||||
var parts = path.split(/[\/\\]/);
|
|
||||||
return parts[parts.length - 1].toUpperCase();
|
|
||||||
}
|
|
||||||
|
|
||||||
FolderDialog {
|
FolderDialog {
|
||||||
id: saveDirDialog
|
id: saveDirDialog
|
||||||
@@ -300,34 +294,29 @@ ColumnLayout {
|
|||||||
spacing: 2
|
spacing: 2
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
text: root.csvPath !== "" ? root.getCsvFileName() : "DIRECTORY"
|
text: "DIRECTORY"
|
||||||
color: root.csvPath !== "" ? Theme.headingColor : Theme.sideMutedText
|
color: Theme.sideMutedText
|
||||||
font.pixelSize: root.csvPath !== "" ? Theme.fontSm : Theme.fontMd
|
font.pixelSize: Theme.fontMd
|
||||||
font.weight: root.csvPath !== "" ? Font.Bold : Font.Medium
|
font.weight: Font.Medium
|
||||||
font.letterSpacing: root.csvPath !== "" ? 0 : 1.2
|
font.letterSpacing: 1.2
|
||||||
font.family: Theme.uiFontFamily
|
font.family: Theme.uiFontFamily
|
||||||
elide: Text.ElideRight
|
}
|
||||||
|
Text {
|
||||||
|
text: deviceController.saveDataDir || "Not configured"
|
||||||
|
color: Theme.bodyColor
|
||||||
|
font.pixelSize: Theme.fontSm
|
||||||
|
font.family: Theme.uiFontFamily
|
||||||
|
font.italic: true
|
||||||
|
opacity: 0.7
|
||||||
|
elide: Text.ElideMiddle
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Item { Layout.fillHeight: true }
|
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
spacing: 8
|
spacing: 8
|
||||||
|
|
||||||
Text {
|
|
||||||
text: deviceController.saveDataDir || "Not configured"
|
|
||||||
color: Theme.bodyColor
|
|
||||||
font.pixelSize: Theme.fontXs
|
|
||||||
font.family: Theme.uiFontFamily
|
|
||||||
font.italic: true
|
|
||||||
opacity: 0.6
|
|
||||||
elide: Text.ElideMiddle
|
|
||||||
Layout.fillWidth: true
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
visible: root.csvPath !== ""
|
visible: root.csvPath !== ""
|
||||||
width: sessionSavedLabel.implicitWidth + 12
|
width: sessionSavedLabel.implicitWidth + 12
|
||||||
@@ -349,6 +338,8 @@ ColumnLayout {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Item { Layout.fillWidth: true }
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
id: browseBtn
|
id: browseBtn
|
||||||
text: "Save As"
|
text: "Save As"
|
||||||
|
|||||||
Reference in New Issue
Block a user