test: sample padding pixel so movestate colors survive Linux fonts
CI / lint (push) Skipped
CI / test (3.11) (push) Skipped
CI / test (3.12) (push) Skipped
CI / test (3.13) (push) Skipped
CI / test-with-beamline-plugins (pxi_bec) (push) Skipped
CI / test-with-beamline-plugins (pxii_bec) (push) Skipped
CI / test-with-beamline-plugins (pxiii_bec) (push) Skipped
CI / lint (pull_request) Successful in 1m11s
CI / test (3.11) (pull_request) Successful in 1m12s
CI / test (3.12) (pull_request) Successful in 1m10s
CI / test (3.13) (pull_request) Successful in 1m9s
CI / test-with-beamline-plugins (pxi_bec) (pull_request) Successful in 1m8s
CI / test-with-beamline-plugins (pxii_bec) (pull_request) Successful in 1m18s
CI / test-with-beamline-plugins (pxiii_bec) (pull_request) Successful in 1m7s
CI / test-with-coverage (pull_request) Successful in 1m23s
CI / coverage-analysis (pull_request) Successful in 4s

x=20 sits on a digit glyph with CI's Linux fonts, so the assert compared
an antialiased glyph blend against the pure background. The padding area
(border 1px + padding 6px) can never contain text on any font.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0147jE48bQUTm9AqNQApT6b2
This commit is contained in:
2026-08-24 13:40:26 +02:00
committed by duan_j
co-authored by Claude Fable 5
parent d2df8ce11c
commit a75eac264e
+5 -1
View File
@@ -120,8 +120,12 @@ def test_spin_move_state_colors_actually_render(qtbot):
spin.show()
def value_area_color():
# Sample inside the left padding (1px border + 6px QSS padding), not
# the text area: glyph positions are font-dependent and on CI's Linux
# fonts x=20 lands on a digit of "12.40", returning an antialiased
# glyph/background blend instead of the plain background color.
img = spin.grab().toImage()
return img.pixelColor(20, img.height() // 2)
return img.pixelColor(4, img.height() // 2)
state.update_actual(12.0)
neutral = value_area_color()