Skip to content

feat: Larger, configurable viewer UI text size (IMA-179) - #6

Merged
maragall merged 2 commits into
mainfrom
juliomaragall/ima-179-larger-text
Jul 6, 2026
Merged

feat: Larger, configurable viewer UI text size (IMA-179)#6
maragall merged 2 commits into
mainfrom
juliomaragall/ima-179-larger-text

Conversation

@maragall

@maragall maragall commented Jul 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • Slider-row labels 12px → 14px, superqt SliderLabel value text 10px → 12px, driven by two module constants (UI_FONT_SIZE_PX, SLIDER_VALUE_FONT_SIZE_PX) interpolated into NDV_SLIDER_STYLE and the launcher drop-label style — configurable in one place (IMA-179 acceptance).
  • Fixes T/FOV label clipping: replaces setFixedWidth(30) with _sync_slider_label_widths() — shared width from explicit-QFont metrics (widget fontMetrics() is stale before polish) over every known FOV label + slider maxima, re-synced from the push-API label-set paths and rangeChanged.
  • Exports the constants through the package __init__ and the Squid shim.
  • ndv's embedded controls set their own font stylesheets (beat any ancestor rule) — tracked separately as IMA-197.

Test plan

  • New tests/test_ui_font_size.py (8 tests): constant wiring, groove/handle regression guard, width fits widest FOV label, equal label widths, post-setup push-API resync, floor width. No ndv import.
  • Full suite locally: 244 passed; 3 pre-existing test_push_api.py failures reproduce on clean main (missing tifffile in local env, unrelated).

🤖 Generated with Claude Code

maragall and others added 2 commits July 5, 2026 23:37
Slider-row labels 12px -> 14px and superqt SliderLabel value text
10px -> 12px, driven by two module constants (UI_FONT_SIZE_PX,
SLIDER_VALUE_FONT_SIZE_PX) interpolated into NDV_SLIDER_STYLE and the
launcher drop-label style — one place to retune.

Also replaces the T/FOV labels' setFixedWidth(30), which clipped text
like "FOV: cell_0_0:3" and would clip more at the larger size, with
_sync_slider_label_widths(): a shared width measured via an explicit
QFont at UI_FONT_SIZE_PX (widget fontMetrics() are stale before
polish), covering every known FOV label plus the slider maxima, and
re-synced from the push-API label-set paths and slider rangeChanged.

ndv's embedded controls keep their own font stylesheets (they beat any
ancestor rule) — tracked separately as IMA-197.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…-larger-text

# Conflicts:
#	ndviewer_light/core.py
@maragall
maragall merged commit 40be24e into main Jul 6, 2026
2 checks passed
@maragall
maragall deleted the juliomaragall/ima-179-larger-text branch July 6, 2026 03:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant