Skip to content

Improve voucher toolbar with consistent SVG controls - #138

Merged
perNyfelt merged 5 commits into
mainfrom
fix/125-voucher-toolbar
Nov 13, 2026
Merged

perNyfelt merged 5 commits into
mainfrom
fix/125-voucher-toolbar

Conversation

@perNyfelt

@perNyfelt perNyfelt commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

The voucher editor uses Lucide SVG icons with a labelled primary Save button and consistent command sizing. The after-save mode has a visible, translated On/Off label and the theme's ordinary toggle styling, so its state can be read without relying on color.

  • Remove the permanently disabled Delete button, its unused icon, and the unreachable delete/cancel method, confirmation dialog, translations, and tests. Registered vouchers use the correction action where permitted.
  • Render disabled icons with Button.disabledText, without applying an additional grayscale filter. Selected toggles use the theme's shared toggle foreground.
  • Give the calendar button its own translated “Choose date” tooltip and accessible name.
  • Compute button sizes from the current font and UI scale, with a 34 px minimum, instead of overlapping fixed sizes and minimum-size styles.
  • Match FlowLayout's wrap calculation, including panel and parent insets and its exact gap handling. Exhaustive sweeps cover every window width from 300 through 1300 pixels in English and Swedish, with both toggle states; an isolated inset test covers 200 through 1300 pixels. Tests check for clipped controls and excess blank rows.
  • Reserve the wider translated On/Off label using the current font, so toggling cannot move neighboring commands or change wrapping.

Validation:

  • ./gradlew spotlessApply, ./gradlew codenarcMain codenarcTest, and ./gradlew build: 820 tests, zero failures, 11 skipped.
  • Windows 11 ARM64, Java 21.0.12.1: all 56 selected JUnit tests passed, with no failures or skips. Ran the verified application/test classes and dependencies from an isolated temporary bundle.
  • Coverage includes enabled and disabled icon rendering in both themes, toggle state text and colors, font resizing, a distinct selected-theme foreground, actual command and calendar icons/names in both languages, wrapped layout when narrowing and widening the window, and both after-save modes.

No schema or migration changes. Screenshots are headless Swing renders using isolated test data. Image URLs are pinned to a commit so branch deletion after merge will not break them.

macOS, light:
macOS light toolbar

macOS, dark:
macOS dark toolbar

Windows 11 ARM64, light:
Windows light toolbar

Windows 11 ARM64, dark:
Windows dark toolbar

Windows, registered voucher with disabled Save and after-save mode off:
Windows disabled Save and mode off

Windows, Swedish toolbar at a 600 px window width:
Windows wrapped Swedish toolbar

Additional macOS renders: registered voucher, wrapped Swedish toolbar.

Fixes #125.

@perNyfelt
perNyfelt merged commit 75a8db6 into main Nov 13, 2026
3 checks passed
@perNyfelt
perNyfelt deleted the fix/125-voucher-toolbar branch November 13, 2026 18:30
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.

Voucher editor toolbar: inconsistent buttons and Unicode glyph icons - three layout proposals with SVG icons

1 participant