fix(ui): light-mode polish — nav hover, graph theme tokens, title alignment

This commit is contained in:
jack
2026-07-11 20:50:42 -07:00
parent 9e3bec9031
commit f9c6639a66
6 changed files with 124 additions and 92 deletions
+2 -7
View File
@@ -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 }
}
+43 -10
View File
@@ -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 {
+73 -69
View File
@@ -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
}
}
}
}
+1 -1
View File
@@ -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
@@ -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",
)
@@ -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