Skip to content

refactor(pixmap): route all panel icons through BlocksPixmap - #325

Open
gmmcosta15 wants to merge 2 commits into
refactor/blocks-pixmap-corefrom
refactor/blocks-pixmap-panels
Open

refactor(pixmap): route all panel icons through BlocksPixmap#325
gmmcosta15 wants to merge 2 commits into
refactor/blocks-pixmap-corefrom
refactor/blocks-pixmap-panels

Conversation

@gmmcosta15

@gmmcosta15 gmmcosta15 commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Description

  • Code refactor

  • Convert every remaining handwritten panel and widget.

  • Use source() at the 3 full-bleed sites: slider background, babystep graphic, probe helper graphic.

  • Add stylesheet url(:/...) scanning to the resource guard.

  • Net 116 lines removed across 39 files.

Motivation

Completes the stack: one object owns every pixmap, no handwritten panel holds a raw literal.

drawPixmap clips rather than stretches when the source rect exceeds the pixmap, so full-bleed art needs source(), not a 128x128 raster.

The guard could not match url(:/...), which has no quote next to the :. 17 such sites across 11 panels were invisible to it and only looked covered because the same keys appear quoted elsewhere.

Generated UI modules are out of scope; controlStackedWidget_ui.py is hand-edited and must not be regenerated.

Tests

make check green (pylint 8.27/10, unchanged); docstr-coverage 80.3%.

Screenshots

Pre-existing and unchanged from dev: the babystep/probe-helper graphic is a 346x276 asset in a 121px label with setScaledContents(False), so it is vertically centre-cropped.

Future work

  • Convert the 79 raw literals in the generated UI modules.
  • Reorganise the resource tree, rename the assets to one convention, add a manifest.
  • Measure RSS on the RF50 against the 404400 kB baseline.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

python Pull requests that update python code Refactor Enhancing code's readability, maintainability, and extensibility while addressing technical debt. UI/UX User Interface what changed with this code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant