diff --git a/src/pygui/ISC/HomePage.qml b/src/pygui/ISC/HomePage.qml index d707e1f..89a0e7d 100644 --- a/src/pygui/ISC/HomePage.qml +++ b/src/pygui/ISC/HomePage.qml @@ -267,9 +267,6 @@ Rectangle { background: Rectangle { radius: 50 color: pillBtn.checked ? Theme.sidePanelBackground : "transparent" - Behavior on color { - ColorAnimation { duration: Theme.durationFast } - } } contentItem: Row { @@ -288,10 +285,8 @@ Rectangle { width: 16; height: 16 source: model.icon sourceSize.width: 16; sourceSize.height: 16 - color: pillBtn.checked ? Theme.headingColor - : pillBtn.hovered ? Qt.lighter(Theme.sideMutedText, 1.7) - : Theme.sideMutedText - opacity: pillBtn.checked ? 0.9 : pillBtn.hovered ? 0.7 : 0.4 + color: (pillBtn.checked || pillBtn.hovered) ? Theme.headingColor : Theme.sideMutedText + opacity: pillBtn.checked ? 0.9 : pillBtn.hovered ? 0.85 : 0.4 Behavior on color { ColorAnimation { duration: Theme.durationFast } } diff --git a/src/pygui/ISC/Tabs/components/RunChart.qml b/src/pygui/ISC/Tabs/components/RunChart.qml index ddfce60..668c976 100644 --- a/src/pygui/ISC/Tabs/components/RunChart.qml +++ b/src/pygui/ISC/Tabs/components/RunChart.qml @@ -18,6 +18,14 @@ Item { property alias seriesData: chart.seriesData property alias title: chart.title + // Same palette that colors the chart lines (GraphQuickItem.seriesColors, + // theme-agnostic — see docs/adr/0004 for why); falls back to the default + // text color when the sensor isn't found (e.g. a stale binding mid-swap). + function sensorColor(name) { + var idx = chart.sensorNames.indexOf(name) + return (idx >= 0 && idx < chart.seriesColors.length) ? chart.seriesColors[idx] : Theme.headingColor + } + ColumnLayout { anchors.fill: parent spacing: 8 @@ -32,6 +40,10 @@ Item { showMinMaxMarkers: true xLabel: "Measurement Interval" yLabel: "Temperature (°C)" + backgroundColor: Theme.cardBackground + gridColor: Theme.toneBorder + axisColor: Theme.toneMute + textColor: Theme.headingColor } MouseArea { @@ -61,6 +73,7 @@ Item { // ── Min/Max/Avg readout strip + Reset Zoom ───────────────────── RowLayout { Layout.fillWidth: true + Layout.leftMargin: 8 spacing: 16 Label { @@ -70,11 +83,21 @@ Item { font.pixelSize: Theme.fontSm font.weight: Font.Medium } - Label { - text: chart.viewMin.toFixed(2) + (chart.viewMinSensor ? " (" + chart.viewMinSensor + ")" : "") - color: Theme.headingColor - font.family: Theme.codeFontFamily - font.pixelSize: Theme.fontSm + Row { + Label { + text: chart.viewMin.toFixed(2) + color: Theme.headingColor + font.family: Theme.codeFontFamily + font.pixelSize: Theme.fontSm + } + Label { + visible: !!chart.viewMinSensor + text: chart.viewMinSensor ? " (" + chart.viewMinSensor + ")" : "" + color: root.sensorColor(chart.viewMinSensor) + font.family: Theme.codeFontFamily + font.pixelSize: Theme.fontSm + font.weight: Font.Medium + } } Label { @@ -84,11 +107,21 @@ Item { font.pixelSize: Theme.fontSm font.weight: Font.Medium } - Label { - text: chart.viewMax.toFixed(2) + (chart.viewMaxSensor ? " (" + chart.viewMaxSensor + ")" : "") - color: Theme.headingColor - font.family: Theme.codeFontFamily - font.pixelSize: Theme.fontSm + Row { + Label { + text: chart.viewMax.toFixed(2) + color: Theme.headingColor + font.family: Theme.codeFontFamily + font.pixelSize: Theme.fontSm + } + Label { + visible: !!chart.viewMaxSensor + text: chart.viewMaxSensor ? " (" + chart.viewMaxSensor + ")" : "" + color: root.sensorColor(chart.viewMaxSensor) + font.family: Theme.codeFontFamily + font.pixelSize: Theme.fontSm + font.weight: Font.Medium + } } Label { diff --git a/src/pygui/ISC/Tabs/components/UtilityFooter.qml b/src/pygui/ISC/Tabs/components/UtilityFooter.qml index 835566d..2d50966 100644 --- a/src/pygui/ISC/Tabs/components/UtilityFooter.qml +++ b/src/pygui/ISC/Tabs/components/UtilityFooter.qml @@ -22,54 +22,6 @@ Rectangle { anchors.margins: 4 spacing: 4 - Button { - id: settingsBtn - flat: true - Layout.fillWidth: true - Layout.fillHeight: true - icon.source: "../icons/settings.svg" - onClicked: if (settingsPopup) settingsPopup.open() - - background: Rectangle { - radius: 8 - color: settingsBtn.hovered - ? Theme.sideActiveBackground : "transparent" - } - - contentItem: Row { - spacing: 6 - anchors.centerIn: parent - - IconImage { - anchors.verticalCenter: parent.verticalCenter - width: 16 - height: 16 - source: "../icons/settings.svg" - sourceSize.width: 16 - sourceSize.height: 16 - color: Theme.headingColor - opacity: 0.75 - } - - Label { - anchors.verticalCenter: parent.verticalCenter - text: "SETTINGS" - color: Theme.headingColor - font.family: Theme.uiFontFamily - font.pixelSize: Theme.fontXs - font.bold: true - font.letterSpacing: 1.2 - opacity: 0.8 - } - } - } - - Rectangle { - width: 1 - height: 24 - color: Theme.sideBorder - } - Button { id: aboutBtn flat: true @@ -84,30 +36,82 @@ Rectangle { ? Theme.sideActiveBackground : "transparent" } - contentItem: Row { - spacing: 6 - anchors.centerIn: parent + contentItem: Item { + Row { + spacing: 6 + anchors.centerIn: parent - IconImage { - anchors.verticalCenter: parent.verticalCenter - width: 16 - height: 16 - source: "../icons/about.svg" - sourceSize.width: 16 - sourceSize.height: 16 - color: Theme.headingColor - opacity: 0.75 + IconImage { + anchors.verticalCenter: parent.verticalCenter + width: 16 + height: 16 + source: "../icons/about.svg" + sourceSize.width: 16 + sourceSize.height: 16 + color: Theme.headingColor + opacity: 0.75 + } + + Label { + anchors.verticalCenter: parent.verticalCenter + text: "ABOUT" + color: Theme.headingColor + font.family: Theme.uiFontFamily + font.pixelSize: Theme.fontXs + font.bold: true + font.letterSpacing: 1.2 + opacity: 0.8 + } } + } + } - Label { - anchors.verticalCenter: parent.verticalCenter - text: "ABOUT" - color: Theme.headingColor - font.family: Theme.uiFontFamily - font.pixelSize: Theme.fontXs - font.bold: true - font.letterSpacing: 1.2 - opacity: 0.8 + Rectangle { + width: 1 + height: 24 + color: Theme.sideBorder + } + + Button { + id: settingsBtn + flat: true + Layout.fillWidth: true + Layout.fillHeight: true + icon.source: "../icons/settings.svg" + onClicked: if (settingsPopup) settingsPopup.open() + + background: Rectangle { + radius: 8 + color: settingsBtn.hovered + ? Theme.sideActiveBackground : "transparent" + } + + contentItem: Item { + Row { + spacing: 6 + anchors.centerIn: parent + + IconImage { + anchors.verticalCenter: parent.verticalCenter + width: 16 + height: 16 + source: "../icons/settings.svg" + sourceSize.width: 16 + sourceSize.height: 16 + color: Theme.headingColor + opacity: 0.75 + } + + Label { + anchors.verticalCenter: parent.verticalCenter + text: "SETTINGS" + color: Theme.headingColor + font.family: Theme.uiFontFamily + font.pixelSize: Theme.fontXs + font.bold: true + font.letterSpacing: 1.2 + opacity: 0.8 + } } } } diff --git a/src/pygui/ISC/Theme.qml b/src/pygui/ISC/Theme.qml index 478affb..0e66083 100644 --- a/src/pygui/ISC/Theme.qml +++ b/src/pygui/ISC/Theme.qml @@ -137,7 +137,7 @@ QtObject { // ── 12. Side rail ──────────────────────────────────────────────────────── readonly property color sideRailBackground: tone150 readonly property color sidePanelBackground: isDarkMode ? "#151518" : "#F3F3F1" - readonly property color sideActiveBackground: isDarkMode ? "#25252B" : "#FFFFFF" + readonly property color sideActiveBackground: isDarkMode ? "#25252B" : "#E8E8E6" readonly property color sideBorder: toneBorder readonly property color sideMutedText: toneMute diff --git a/src/pygui/backend/visualization/graph_quick_item.py b/src/pygui/backend/visualization/graph_quick_item.py index d833247..ec3baef 100644 --- a/src/pygui/backend/visualization/graph_quick_item.py +++ b/src/pygui/backend/visualization/graph_quick_item.py @@ -117,7 +117,7 @@ class GraphQuickItem(QQuickPaintedItem): self._min_y: float = 0.0 self._max_y: float = 150.0 - self._padding: dict[str, int] = {"left": 60, "right": 20, "top": 30, "bottom": 50} + self._padding: dict[str, int] = {"left": 60, "right": 20, "top": 44, "bottom": 50} # Viewport (replay chart zoom/pan): defaults reproduce "whole series", # so the Graph tab (which never sets these) is unaffected. See @@ -462,8 +462,8 @@ class GraphQuickItem(QQuickPaintedItem): painter.setFont(title_font) painter.setPen(QPen(self._text_color)) painter.drawText( - QRectF(0, 4, w, 24), - Qt.AlignmentFlag.AlignHCenter, + QRectF(8, 4, w - 8, 24), + Qt.AlignmentFlag.AlignLeft | Qt.AlignmentFlag.AlignVCenter, self._title, ) @@ -649,5 +649,5 @@ class GraphQuickItem(QQuickPaintedItem): painter.drawText( pr, Qt.AlignmentFlag.AlignCenter, - "No data — read a wafer or open a CSV file", + "No data — select a CSV file to view the graph", ) diff --git a/src/pygui/backend/visualization/wafer_map_item.py b/src/pygui/backend/visualization/wafer_map_item.py index a44bb61..a07f2b7 100644 --- a/src/pygui/backend/visualization/wafer_map_item.py +++ b/src/pygui/backend/visualization/wafer_map_item.py @@ -124,7 +124,7 @@ class WaferMapItem(QQuickPaintedItem): self._margin: float = 1.0 self._blend: float = 0.0 self._show_labels: bool = True - self._show_extremes: bool = True + self._show_extremes: bool = False self._shape: str = "round" self._size: float = 300.0 self._thickness_data: list[list[float]] = [] # [x_mm, y_mm, t2] triples