1
0
Fork 0
Commit graph

68 commits

Author SHA1 Message Date
Robbert van der Helm 375262aaa3 Also drop Sync requirement for editor handles 2022-10-20 14:41:53 +02:00
Robbert van der Helm bd295b7380 Move nih_plug::param to nih_plug::params 2022-10-20 12:26:12 +02:00
Robbert van der Helm 2a0ed0c5ec Move PersistentField and helpers to dedicated mod
As mentioned in the previous commit's breaking changes entry.
2022-10-20 12:11:04 +02:00
Robbert van der Helm fb71d0fcce Move the Params trait out of params::internals
This makes much more sense, since this trait is a cornerstone of
NIH-plug.
2022-10-20 12:10:35 +02:00
Robbert van der Helm b9c1a4e5e1 Make Arc<IcedState> persistable 2022-07-13 23:16:54 +02:00
Robbert van der Helm ae31e416c2 Don't use baseview system scaling on Windows/Linux
Until the UI frameworks make it possible to get the size or scale for
the window, this would cause the window contents to be scaled
incorrectly if the host does not set a scale factor.
2022-04-27 18:33:08 +02:00
Robbert van der Helm bb3175f68e Return -> Returns at the start of a docstring
The imperative tense doesn't make any sense when the function is a mere
getter and doesn't actually perform a nontrivial task.
2022-04-26 19:39:51 +02:00
Robbert van der Helm 9acd312768 Parmaeters are not real, they can't hurt you 2022-04-24 19:46:07 +02:00
Robbert van der Helm 083885a40c Rework Params trait API with Arc instead of Pin
This is a breaking change requiring a small change to plugin
implementations.

The reason why `Pin<&dyn Params>` was used was more as a hint to
indicate that the object must last for the plugin's lifetime, but `Pin`
doesn't enforce that. It also makes the APIs a lot more awkward.
Requiring the use of `Arc` fixes the following problems:

- When storing the params object in the wrapper, the `ParamPtr`s are
  guaranteed to be stable.
- This makes it possible to access the `Params` object without acquiring
  a lock on the plugin, this is very important for implementing
  plugin-side preset management.
- It enforces immutability on the `Params` object.
- And of course the API is much nicer without a bunch of unsafe code to
  work around Pin's limitations.
2022-04-07 15:31:46 +02:00
Robbert van der Helm 5caca30f83 Work around ICE for cargo doc+nih_plug_iced 2022-03-27 03:24:39 +02:00
Robbert van der Helm 144e30239e Use ParamFlags::HIDE_IN_GENERIC_UI in generic UIs 2022-03-23 13:16:56 +01:00
Robbert van der Helm 9e3149b931 Move ParamPtr to the prelude 2022-03-23 12:46:46 +01:00
Robbert van der Helm d84b456edb Draw ticks for the vizia PeakMeter
They are just slightly blurry.
2022-03-21 23:45:55 +01:00
Robbert van der Helm f084f14095 Refactor GUIs to use param's own default value
This removes the need to pass a lot of these `ParamSetter`s and
`GuiContext`s around. We also don't need explicit events to reset a
parameter anymore since you can get this information from the parameter
itself.
2022-03-21 13:11:36 +01:00
Robbert van der Helm d5d54f0c06 Fix generic UIs after last commit 2022-03-20 13:37:01 +01:00
Robbert van der Helm b9d79771cc Use String instead of &'static str in Params
This may hurt performance in generic UIs a bit, but it will allow you to
programatically generate custom Params implementations for repeated
Parameters structs.
2022-03-20 02:14:18 +01:00
Robbert van der Helm 47fe8c35f7 Compensate for borders in iced ParamSlider 2022-03-19 02:19:53 +01:00
Robbert van der Helm 2e18ae0ebc Fix Shift+drag start behavior for iced and vizia
The previous calculation was incorrect as it would cause the value to
jump a bit.
2022-03-19 02:18:30 +01:00
Robbert van der Helm da4523ac4c Add a thin weight for Noto Sans 2022-03-18 01:37:22 +01:00
Robbert van der Helm fd6836b891 Add font re-exports for vizia 2022-03-18 00:23:11 +01:00
Robbert van der Helm 22b51f50bb Fix iced param slider not snapping to values
For discrete parameters.
2022-03-17 20:28:21 +01:00
Robbert van der Helm bbb3f4eb64 Limit fill-slider-from-middle to centered params
Otherwise this looks a bit confusing.
2022-03-17 19:29:31 +01:00
Robbert van der Helm c3f717480e Update nih_plug_iced regarding default features 2022-03-16 16:07:08 +01:00
Robbert van der Helm 824893c33d Fix iced ParamSlider fill overlapping with border 2022-03-16 01:38:35 +01:00
Robbert van der Helm 1971273cb6 Always fill stepped parameter sliders from left 2022-03-16 01:33:47 +01:00
Robbert van der Helm 82f1923399 Add scrollbar padding option to iced generic UI
This makes the scroll bar look less cramped.
2022-03-16 01:29:03 +01:00
Robbert van der Helm 1ddc305be5 Use the new iced generic UI for Diopser
This handles a bit nicer than the egui UI.
2022-03-16 01:20:13 +01:00
Robbert van der Helm 24851bdc39 Fix iced ParamSlider for true by default booleans
This looked very confusing otherwise.
2022-03-16 01:19:09 +01:00
Robbert van der Helm 3b08da0f09 Add a generic UI widget for iced 2022-03-16 01:17:12 +01:00
Robbert van der Helm 9aed0f9bc6 Fix incorrect gesture pairs in iced ParamSlider 2022-03-15 19:06:41 +01:00
Robbert van der Helm 62a7994877 Start the peak meter at -90 dB
This makes the spacing look a bit nicer.
2022-03-15 17:09:31 +01:00
Robbert van der Helm 4d58df1e08 Add an iced peak meter widget 2022-03-15 17:06:47 +01:00
Robbert van der Helm 1ead41050c Prevent iced subscriptions from spinning 2022-03-15 15:52:29 +01:00
Robbert van der Helm 0b3e7708a6 Add a usage example to nih_plug_iced 2022-03-15 13:47:35 +01:00
Robbert van der Helm 3dbc9acc56 Use active param slider background for text edit 2022-03-15 13:13:47 +01:00
Robbert van der Helm 6144fc0011 Center the text entry field 2022-03-15 13:06:05 +01:00
Robbert van der Helm 61c60b5c73 Preselect the entire text entry dialog 2022-03-15 12:49:43 +01:00
Robbert van der Helm efa1a5a0b4 Allow text entry on Alt+Click 2022-03-15 12:48:40 +01:00
Robbert van der Helm 8e9583d6d2 Handle releasing shift properly for slider widget 2022-03-14 20:05:54 +01:00
Robbert van der Helm cf1314ce53 Update iced_baseview
Now the window always redraws no matter what.
2022-03-14 19:20:05 +01:00
Robbert van der Helm 4714b025a5 Don't check bounds for parameter dragging
You should be able to keep dragging after leaving the widget area.
2022-03-14 16:34:44 +01:00
Robbert van der Helm 705433069a Add a todo for handling scrolling 2022-03-14 16:27:41 +01:00
Robbert van der Helm 295fb4b0cb Allow shift+drag outside of widget bounds 2022-03-14 16:24:11 +01:00
Robbert van der Helm 82c33da022 Allow releasing drags outside of slider area 2022-03-14 16:21:52 +01:00
Robbert van der Helm eb9e7d81a9 Simplify widgets 2022-03-14 16:05:09 +01:00
Robbert van der Helm 93990d604b Provide iced constants for fonts 2022-03-14 15:56:11 +01:00
Robbert van der Helm 95827afc81 Use Noto Sans instead of the default Lato 2022-03-14 15:50:29 +01:00
Robbert van der Helm f1a855f2e3 Highlight the parameter while dragging 2022-03-14 15:01:24 +01:00
Robbert van der Helm 304b9bdfeb Fix granular drag when clicking with shift held 2022-03-14 15:00:40 +01:00
Robbert van der Helm 986e93b8d0 Implement double click for reset 2022-03-14 14:43:30 +01:00