refactor: simplify StatusTab UI layout
This commit is contained in:
@@ -109,12 +109,6 @@ ColumnLayout {
|
||||
function parseAndSavePendingRead() {
|
||||
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 {
|
||||
id: saveDirDialog
|
||||
@@ -300,34 +294,29 @@ ColumnLayout {
|
||||
spacing: 2
|
||||
|
||||
Text {
|
||||
text: root.csvPath !== "" ? root.getCsvFileName() : "DIRECTORY"
|
||||
color: root.csvPath !== "" ? Theme.headingColor : Theme.sideMutedText
|
||||
font.pixelSize: root.csvPath !== "" ? Theme.fontSm : Theme.fontMd
|
||||
font.weight: root.csvPath !== "" ? Font.Bold : Font.Medium
|
||||
font.letterSpacing: root.csvPath !== "" ? 0 : 1.2
|
||||
text: "DIRECTORY"
|
||||
color: Theme.sideMutedText
|
||||
font.pixelSize: Theme.fontMd
|
||||
font.weight: Font.Medium
|
||||
font.letterSpacing: 1.2
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
Item { Layout.fillHeight: true }
|
||||
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
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 {
|
||||
visible: root.csvPath !== ""
|
||||
width: sessionSavedLabel.implicitWidth + 12
|
||||
@@ -349,6 +338,8 @@ ColumnLayout {
|
||||
}
|
||||
}
|
||||
|
||||
Item { Layout.fillWidth: true }
|
||||
|
||||
Button {
|
||||
id: browseBtn
|
||||
text: "Save As"
|
||||
|
||||
Reference in New Issue
Block a user