Skip to content

Commit

Permalink
Change the minimum scale factor in Vizia to 0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
robbert-vdh committed Dec 30, 2023
1 parent 25a25d0 commit 674e871
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ state is to list breaking changes.
- `nih_debug_assert*!()` failures are now promoted to a warning instead of a
debug message. This makes the non-fatal debug assertion failures easier to
spot.
- The minimum scale factor in `nih_plug_vizia` has changed from 0.25 to 0.5.
Vizia rounds things to single pixels, and below 0.5 scaling single pixel
borders would disappear when not using a HiDPI setup.

### Fixed

Expand Down
5 changes: 3 additions & 2 deletions nih_plug_vizia/src/widgets/resize_handle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,9 @@ impl View for ResizeHandle {
* (compensated_physical_x / start_physical_x)
.max(compensated_physical_y / start_physical_y)
as f64)
// Prevent approaching zero here because uh
.max(0.25);
// Vizia rounds borders to integer pixels, and at <0.5 scaling one pixel
// borders will simply disappear
.max(0.5);

// If this is different then the window will automatically be resized at the end
// of the frame
Expand Down

0 comments on commit 674e871

Please sign in to comment.