1
0
Fork 0

Add the Spectral Compressor version to the GUI

This commit is contained in:
Robbert van der Helm 2023-01-16 01:17:07 +01:00
parent b56d8771f3
commit 77cbef5f82
2 changed files with 24 additions and 10 deletions

View file

@ -8,6 +8,11 @@ Versioning](https://semver.org/spec/v2.0.0.html).
## [0.3.0] - 2023-01-15 ## [0.3.0] - 2023-01-15
### Added
- Added the version number and a link to the GitHub page to the GUI to make it
easier to determine which version you're using.
### Removed ### Removed
- The DC filter option is gone. It was used to prevent upwards compression from - The DC filter option is gone. It was used to prevent upwards compression from

View file

@ -14,17 +14,18 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>. // along with this program. If not, see <https://www.gnu.org/licenses/>.
use nih_plug::prelude::Editor; use nih_plug::prelude::*;
use nih_plug_vizia::vizia::prelude::*; use nih_plug_vizia::vizia::prelude::*;
use nih_plug_vizia::widgets::*; use nih_plug_vizia::widgets::*;
use nih_plug_vizia::{assets, create_vizia_editor, ViziaState, ViziaTheming}; use nih_plug_vizia::{assets, create_vizia_editor, ViziaState, ViziaTheming};
use std::sync::Arc; use std::sync::Arc;
use crate::SpectralCompressorParams; use crate::{SpectralCompressor, SpectralCompressorParams};
// I couldn't get `LayoutType::Grid` to work as expected, so we'll fake a 4x4 grid with // I couldn't get `LayoutType::Grid` to work as expected, so we'll fake a 4x4 grid with
// hardcoded column widths // hardcoded column widths
const COLUMN_WIDTH: Units = Pixels(330.0); const COLUMN_WIDTH: Units = Pixels(330.0);
const DARKER_GRAY: Color = Color::rgb(0x69, 0x69, 0x69);
#[derive(Lens)] #[derive(Lens)]
struct Data { struct Data {
@ -54,14 +55,22 @@ pub(crate) fn create(
ResizeHandle::new(cx); ResizeHandle::new(cx);
VStack::new(cx, |cx| { VStack::new(cx, |cx| {
Label::new(cx, "Spectral Compressor") HStack::new(cx, |cx| {
.font_family(vec![FamilyOwned::Name(String::from( Label::new(cx, "Spectral Compressor")
assets::NOTO_SANS_THIN, .font_family(vec![FamilyOwned::Name(String::from(
))]) assets::NOTO_SANS_THIN,
.font_size(30.0) ))])
.right(Pixels(15.0)) .font_size(30.0);
.bottom(Pixels(-5.0)) Label::new(cx, SpectralCompressor::VERSION)
.top(Pixels(10.0)); .color(DARKER_GRAY)
.top(Stretch(1.0))
.bottom(Pixels(4.0))
.left(Pixels(2.0));
})
.height(Pixels(30.0))
.right(Pixels(-17.0))
.bottom(Pixels(-5.0))
.top(Pixels(10.0));
HStack::new(cx, |cx| { HStack::new(cx, |cx| {
make_column(cx, "Globals", |cx| { make_column(cx, "Globals", |cx| {