fix(ui): light-mode polish — nav hover, graph theme tokens, title alignment
This commit is contained in:
@@ -267,9 +267,6 @@ Rectangle {
|
|||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
radius: 50
|
radius: 50
|
||||||
color: pillBtn.checked ? Theme.sidePanelBackground : "transparent"
|
color: pillBtn.checked ? Theme.sidePanelBackground : "transparent"
|
||||||
Behavior on color {
|
|
||||||
ColorAnimation { duration: Theme.durationFast }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
contentItem: Row {
|
contentItem: Row {
|
||||||
@@ -288,10 +285,8 @@ Rectangle {
|
|||||||
width: 16; height: 16
|
width: 16; height: 16
|
||||||
source: model.icon
|
source: model.icon
|
||||||
sourceSize.width: 16; sourceSize.height: 16
|
sourceSize.width: 16; sourceSize.height: 16
|
||||||
color: pillBtn.checked ? Theme.headingColor
|
color: (pillBtn.checked || pillBtn.hovered) ? Theme.headingColor : Theme.sideMutedText
|
||||||
: pillBtn.hovered ? Qt.lighter(Theme.sideMutedText, 1.7)
|
opacity: pillBtn.checked ? 0.9 : pillBtn.hovered ? 0.85 : 0.4
|
||||||
: Theme.sideMutedText
|
|
||||||
opacity: pillBtn.checked ? 0.9 : pillBtn.hovered ? 0.7 : 0.4
|
|
||||||
Behavior on color {
|
Behavior on color {
|
||||||
ColorAnimation { duration: Theme.durationFast }
|
ColorAnimation { duration: Theme.durationFast }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,14 @@ Item {
|
|||||||
property alias seriesData: chart.seriesData
|
property alias seriesData: chart.seriesData
|
||||||
property alias title: chart.title
|
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 {
|
ColumnLayout {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
spacing: 8
|
spacing: 8
|
||||||
@@ -32,6 +40,10 @@ Item {
|
|||||||
showMinMaxMarkers: true
|
showMinMaxMarkers: true
|
||||||
xLabel: "Measurement Interval"
|
xLabel: "Measurement Interval"
|
||||||
yLabel: "Temperature (°C)"
|
yLabel: "Temperature (°C)"
|
||||||
|
backgroundColor: Theme.cardBackground
|
||||||
|
gridColor: Theme.toneBorder
|
||||||
|
axisColor: Theme.toneMute
|
||||||
|
textColor: Theme.headingColor
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
@@ -61,6 +73,7 @@ Item {
|
|||||||
// ── Min/Max/Avg readout strip + Reset Zoom ─────────────────────
|
// ── Min/Max/Avg readout strip + Reset Zoom ─────────────────────
|
||||||
RowLayout {
|
RowLayout {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
Layout.leftMargin: 8
|
||||||
spacing: 16
|
spacing: 16
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
@@ -70,11 +83,21 @@ Item {
|
|||||||
font.pixelSize: Theme.fontSm
|
font.pixelSize: Theme.fontSm
|
||||||
font.weight: Font.Medium
|
font.weight: Font.Medium
|
||||||
}
|
}
|
||||||
Label {
|
Row {
|
||||||
text: chart.viewMin.toFixed(2) + (chart.viewMinSensor ? " (" + chart.viewMinSensor + ")" : "")
|
Label {
|
||||||
color: Theme.headingColor
|
text: chart.viewMin.toFixed(2)
|
||||||
font.family: Theme.codeFontFamily
|
color: Theme.headingColor
|
||||||
font.pixelSize: Theme.fontSm
|
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 {
|
Label {
|
||||||
@@ -84,11 +107,21 @@ Item {
|
|||||||
font.pixelSize: Theme.fontSm
|
font.pixelSize: Theme.fontSm
|
||||||
font.weight: Font.Medium
|
font.weight: Font.Medium
|
||||||
}
|
}
|
||||||
Label {
|
Row {
|
||||||
text: chart.viewMax.toFixed(2) + (chart.viewMaxSensor ? " (" + chart.viewMaxSensor + ")" : "")
|
Label {
|
||||||
color: Theme.headingColor
|
text: chart.viewMax.toFixed(2)
|
||||||
font.family: Theme.codeFontFamily
|
color: Theme.headingColor
|
||||||
font.pixelSize: Theme.fontSm
|
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 {
|
Label {
|
||||||
|
|||||||
@@ -22,54 +22,6 @@ Rectangle {
|
|||||||
anchors.margins: 4
|
anchors.margins: 4
|
||||||
spacing: 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 {
|
Button {
|
||||||
id: aboutBtn
|
id: aboutBtn
|
||||||
flat: true
|
flat: true
|
||||||
@@ -84,30 +36,82 @@ Rectangle {
|
|||||||
? Theme.sideActiveBackground : "transparent"
|
? Theme.sideActiveBackground : "transparent"
|
||||||
}
|
}
|
||||||
|
|
||||||
contentItem: Row {
|
contentItem: Item {
|
||||||
spacing: 6
|
Row {
|
||||||
anchors.centerIn: parent
|
spacing: 6
|
||||||
|
anchors.centerIn: parent
|
||||||
|
|
||||||
IconImage {
|
IconImage {
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
width: 16
|
width: 16
|
||||||
height: 16
|
height: 16
|
||||||
source: "../icons/about.svg"
|
source: "../icons/about.svg"
|
||||||
sourceSize.width: 16
|
sourceSize.width: 16
|
||||||
sourceSize.height: 16
|
sourceSize.height: 16
|
||||||
color: Theme.headingColor
|
color: Theme.headingColor
|
||||||
opacity: 0.75
|
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 {
|
Rectangle {
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
width: 1
|
||||||
text: "ABOUT"
|
height: 24
|
||||||
color: Theme.headingColor
|
color: Theme.sideBorder
|
||||||
font.family: Theme.uiFontFamily
|
}
|
||||||
font.pixelSize: Theme.fontXs
|
|
||||||
font.bold: true
|
Button {
|
||||||
font.letterSpacing: 1.2
|
id: settingsBtn
|
||||||
opacity: 0.8
|
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
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ QtObject {
|
|||||||
// ── 12. Side rail ────────────────────────────────────────────────────────
|
// ── 12. Side rail ────────────────────────────────────────────────────────
|
||||||
readonly property color sideRailBackground: tone150
|
readonly property color sideRailBackground: tone150
|
||||||
readonly property color sidePanelBackground: isDarkMode ? "#151518" : "#F3F3F1"
|
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 sideBorder: toneBorder
|
||||||
readonly property color sideMutedText: toneMute
|
readonly property color sideMutedText: toneMute
|
||||||
|
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ class GraphQuickItem(QQuickPaintedItem):
|
|||||||
|
|
||||||
self._min_y: float = 0.0
|
self._min_y: float = 0.0
|
||||||
self._max_y: float = 150.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",
|
# Viewport (replay chart zoom/pan): defaults reproduce "whole series",
|
||||||
# so the Graph tab (which never sets these) is unaffected. See
|
# so the Graph tab (which never sets these) is unaffected. See
|
||||||
@@ -462,8 +462,8 @@ class GraphQuickItem(QQuickPaintedItem):
|
|||||||
painter.setFont(title_font)
|
painter.setFont(title_font)
|
||||||
painter.setPen(QPen(self._text_color))
|
painter.setPen(QPen(self._text_color))
|
||||||
painter.drawText(
|
painter.drawText(
|
||||||
QRectF(0, 4, w, 24),
|
QRectF(8, 4, w - 8, 24),
|
||||||
Qt.AlignmentFlag.AlignHCenter,
|
Qt.AlignmentFlag.AlignLeft | Qt.AlignmentFlag.AlignVCenter,
|
||||||
self._title,
|
self._title,
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -649,5 +649,5 @@ class GraphQuickItem(QQuickPaintedItem):
|
|||||||
painter.drawText(
|
painter.drawText(
|
||||||
pr,
|
pr,
|
||||||
Qt.AlignmentFlag.AlignCenter,
|
Qt.AlignmentFlag.AlignCenter,
|
||||||
"No data — read a wafer or open a CSV file",
|
"No data — select a CSV file to view the graph",
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ class WaferMapItem(QQuickPaintedItem):
|
|||||||
self._margin: float = 1.0
|
self._margin: float = 1.0
|
||||||
self._blend: float = 0.0
|
self._blend: float = 0.0
|
||||||
self._show_labels: bool = True
|
self._show_labels: bool = True
|
||||||
self._show_extremes: bool = True
|
self._show_extremes: bool = False
|
||||||
self._shape: str = "round"
|
self._shape: str = "round"
|
||||||
self._size: float = 300.0
|
self._size: float = 300.0
|
||||||
self._thickness_data: list[list[float]] = [] # [x_mm, y_mm, t2] triples
|
self._thickness_data: list[list[float]] = [] # [x_mm, y_mm, t2] triples
|
||||||
|
|||||||
Reference in New Issue
Block a user