Skip to content

Fix aspect ratio slider: invert direction, allow shorter views#69

Merged
jourdain merged 1 commit intoKitware:masterfrom
patrickoleary:fix/aspect-ratio
Apr 29, 2026
Merged

Fix aspect ratio slider: invert direction, allow shorter views#69
jourdain merged 1 commit intoKitware:masterfrom
patrickoleary:fix/aspect-ratio

Conversation

@patrickoleary
Copy link
Copy Markdown
Member

@patrickoleary patrickoleary commented Apr 29, 2026

Fix aspect ratio slider: invert direction, allow shorter views

  • Invert slider so sliding right = taller view (smaller width-to-height ratio)
  • Change icon from mdi-arrow-expand-horizontal to mdi-arrow-expand-vertical
  • Expand range from [1, 2] to [0.25, 2], allowing much shorter/wider views (up to 4:1 w/h ratio) for tropical-focused plots
  • Default 0.5 gives a 2:1 width-to-height ratio

Default

ar-default

Shorter

ar-shorter

Taller

ar-taller

Note: This is a breaking change for previous saved state files. Simplest Fix: Just let it load as-is. If someone loads an old state file with aspect_ratio: 2, under the new scheme that means very tall (CSS ratio 0.5). Previously it meant very wide (CSS ratio 2). The visual will differ, but the they can just adjust the slider. I feel this is acceptable for a layout preference. True Fix: The ranges overlap at [1, 2], so there's no way to distinguish an old state value of 1.5 from a new state value of 1.5. The only clean fix would be renaming the state variable (e.g. view_height_ratio) or adding a version field to the state file, which I thought would be over engineering compared to adjusting one slider.

closes #61

@jourdain jourdain merged commit 6200bb9 into Kitware:master Apr 29, 2026
1 check passed
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.

Aspect ratio slider

3 participants